diff options
author | antirez <antirez@gmail.com> | 2018-10-10 11:03:25 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-10-10 11:03:25 +0200 |
commit | 9a6fa7d082e575afa13fe1ffe42e85c06062a150 (patch) | |
tree | eebf505690ee5603a234b9931cdf829d3d019d60 | |
parent | 101e419ffc5a62617d88cf7b218e3581579c3202 (diff) | |
download | redis-9a6fa7d082e575afa13fe1ffe42e85c06062a150.tar.gz |
changelog.tcl: get optional argument for number of commits.
-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. # |