diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | git-debrebase | 23 |
2 files changed, 15 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog index 375e783..6dea169 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ dgit (5.8~) unstable; urgency=medium Bugfixes: * dgit, git-debrebase: Properly make patches even if an awkward .gitignore ignores the things in debian/patches. Closes:#903130. + * git-debrebase status: Fix commit reporting. Closes:903131. * dgit(1): Unscramble push[-source] descriptions. Closes:#903116. -- diff --git a/git-debrebase b/git-debrebase index 292471d..557e789 100755 --- a/git-debrebase +++ b/git-debrebase @@ -1389,15 +1389,20 @@ sub cmd_status () { # todo: gdr status should print upstream component(s) info # todo: gdr should leave/maintain some refs with this kind of info ? - my $oldest = [ 0 ]; + my $oldest = { Badness => 0 }; my $newest; my $note = sub { - my ($badness, $ourmsg, $snagname, $kcmsg, $cl) = @_; - if ($oldest->[0] < $badness) { + my ($badness, $ourmsg, $snagname, $dummy, $cl, $kcmsg) = @_; + if ($oldest->{Badness} < $badness) { $oldest = $newest = undef; } - $oldest = \@_; # we're walking backwards - $newest //= \@_; + $oldest = { + Badness => $badness, + CommitId => $cl->{CommitId}, + OurMsg => $ourmsg, + KcMsg => $kcmsg, + }; + $newest //= $oldest; }; my ($anchor, $bw) = keycommits +(git_rev_parse 'HEAD'), sub { $note->(1, 'branch contains furniture (not laundered)', @_); }, @@ -1414,16 +1419,16 @@ sub cmd_status () { }; print "current branch contents, in git-debrebase terms:\n"; - if (!$oldest->[0]) { + if (!$oldest->{Badness}) { print " branch is laundered\n"; } else { - print " $oldest->[1]\n"; + print " $oldest->{OurMsg}\n"; my $printed = ''; foreach my $info ($oldest, $newest) { - my $cid = $info->[4]{CommitId}; + my $cid = $info->{CommitId}; next if $cid eq $printed; $printed = $cid; - print " $info->[3]\n"; + print " $info->{KcMsg}\n"; $prcommitinfo->($cid); } } |