diff options
author | antirez <antirez@gmail.com> | 2018-10-10 11:03:25 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-10-10 11:03:36 +0200 |
commit | 4eedb0bf94026002d3c5627405d59270d71f7cc1 (patch) | |
tree | b0cadc5a6b38cf5d7216a7f66ee0c7c32ba46f6c /utils | |
parent | 8e2bbe91050342b1d87a44b2bb3bf557047efe59 (diff) | |
download | redis-4eedb0bf94026002d3c5627405d59270d71f7cc1.tar.gz |
changelog.tcl: get optional argument for number of commits.
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/releasetools/changelog.tcl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/releasetools/changelog.tcl b/utils/releasetools/changelog.tcl index 9b3a2cddc..06e38ba99 100755 --- a/utils/releasetools/changelog.tcl +++ b/utils/releasetools/changelog.tcl @@ -1,12 +1,17 @@ #!/usr/bin/env tclsh -if {[llength $::argv] != 2} { - puts "Usage: $::argv0 <branch> <version>" +if {[llength $::argv] != 2 && [llength $::argv] != 3} { + puts "Usage: $::argv0 <branch> <version> \[<num-commits>\]" exit 1 } set branch [lindex $::argv 0] set ver [lindex $::argv 1] +if {[llength $::argv] == 3} { + set count [lindex ::$argv 2] +} else { + set count 100 +} set template { ================================================================================ @@ -21,7 +26,7 @@ append template "\n\n" set date [clock format [clock seconds]] set template [string map [list %ver% $ver %date% $date] $template] -append template [exec git log $branch~100..$branch "--format=format:%an in commit %h:%n %s" --shortstat] +append template [exec git log $branch~$count..$branch "--format=format:%an in commit %h:%n %s" --shortstat] #Older, more verbose version. # |