chiark / gitweb /
Changelog handling: Replace a call to parsechangelog with commit_getclogp
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Sep 2016 12:26:01 +0000 (13:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 25 Sep 2016 19:12:52 +0000 (20:12 +0100)
This is less code, and takes advantage of the memoisation.

No overall functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index e125922..13d17ea 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2127,10 +2127,7 @@ END
     if (defined $skew_warning_vsn) {
        mkpath '.git/dgit';
        printdebug "SKEW CHECK WANT $skew_warning_vsn\n";
-       my $clogf = ".git/dgit/changelog.tmp";
-       runcmd shell_cmd "exec >$clogf",
-           @git, qw(cat-file blob), "$hash:debian/changelog";
-       my $gotclogp = parsechangelog("-l$clogf");
+       my $gotclogp = commit_getclogp($hash);
        my $got_vsn = getfield $gotclogp, 'Version';
        printdebug "SKEW CHECK GOT $got_vsn\n";
        if (version_compare($got_vsn, $skew_warning_vsn) < 0) {