diff options
author | Yvan Roux <yvan.roux@linaro.org> | 2016-05-16 15:02:54 +0200 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2016-06-01 11:06:17 +0000 |
commit | e5eb475b3cf929953b3e59eb31a04d4d364a1566 (patch) | |
tree | cec588f82c0854ce58b7d4f2eab8d50150d5d586 | |
parent | c20c14668098dad728830fbfc5fe9c9446c3f782 (diff) |
Generate ChangeLog since revision instead of date.
Change-Id: I02c27e55536d6b8de50e5d5c4c09437852d8075c
-rwxr-xr-x | gitlog-to-changelog | 12 | ||||
-rwxr-xr-x | tcwg-release.sh | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/gitlog-to-changelog b/gitlog-to-changelog index 3122e79..abdcb1d 100755 --- a/gitlog-to-changelog +++ b/gitlog-to-changelog @@ -70,7 +70,7 @@ OPTIONS: contains multiple paragraphs. --srcdir=DIR the root of the source tree, from which the .git/ directory can be derived. - --since=DATE convert only the logs since DATE; + --since=REV convert only the logs since REV; the default is to convert all log entries. --format=FMT set format string for commit subject and body; see 'man git-log' for the list of format metacharacters; @@ -87,7 +87,7 @@ OPTIONS: EXAMPLE: - $ME --since=2008-01-01 > ChangeLog + $ME --since=c13137b > ChangeLog $ME -- -n 5 foo > last-5-commits-to-branch-foo SPECIAL SYNTAX: @@ -222,7 +222,7 @@ sub git_dir_option($) } { - my $since_date; + my $since_rev; my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; @@ -237,7 +237,7 @@ sub git_dir_option($) ( help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, - 'since=s' => \$since_date, + 'since=s' => \$since_rev, 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, @@ -250,8 +250,8 @@ sub git_dir_option($) 'srcdir=s' => \$srcdir, ) or usage 1; - defined $since_date - and unshift @ARGV, "--since=$since_date"; + defined $since_rev + and unshift @ARGV, "$since_rev..HEAD"; # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) # that makes a correction in the log or attribution of that commit. diff --git a/tcwg-release.sh b/tcwg-release.sh index 2b41a20..ef2f3a9 100755 --- a/tcwg-release.sh +++ b/tcwg-release.sh @@ -856,9 +856,9 @@ export_source if [ ${vstring%%.*} -ge "5" ]; then pushd $REL_DIR/git 1>/dev/null print_info "${bold}Generating ChangeLog.linaro from git commit messages..." - SINCE=$(git log --format=%ai --grep="git-svn-id" | head -n 1) + SINCE=$(git log --format=%H --grep="git-svn-id" | head -n 1) mydir="$(dirname "$(readlink -f "$0")")" - ${mydir}/gitlog-to-changelog --since ${SINCE%% *} --no-cluster \ + ${mydir}/gitlog-to-changelog --since ${SINCE} --no-cluster \ --strip-change-id --format=%B --strip-tab \ ${gitlog_amend} > $REL_DIR/gcc-linaro-${rname}/ChangeLog.linaro |