diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-20 01:42:47 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-20 01:45:39 +0100 |
commit | 1bc7acac1e13f58de74e7e07b0f3c3741f4ef405 (patch) | |
tree | 7d75bafac2ed14ea894a1a4317beeab432786b9c | |
parent | eef842fb0e323b265071e751bcb704a1ce79e950 (diff) |
dgit: quilt fixup: Do not suggest quilt modes if we see gdr
If `stopped at' is a git-debrebase commit, then a non-default quilt
mode is probably not the answer.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | dgit | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index b4fe0cb..a370753 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,8 @@ dgit (6.7~) unstable; urgency=medium in both dgit(7) and in error messages. No longer suggest --quilt=smash or dpkg-source --commit in the error message. Closes:906196. + * dgit: Do not suggest --quilt modes if quilt fixup "stopped at" + a commit made by git-debrebase. Closes:#906197. -- @@ -5368,10 +5368,17 @@ sub quiltify ($$$$) { }; if ($quilt_mode eq 'linear') { print STDERR "\n$us: error: quilt fixup cannot be linear. Stopped at:\n"; + my $all_gdr = !!@nots; foreach my $notp (@nots) { print STDERR "$us: ", $reportnot->($notp), "\n"; + $all_gdr &&= $notp->{Child} && + (git_cat_file $notp->{Child}{Commit}, 'commit') + =~ m{^\[git-debrebase.*\]$}m; } print STDERR "\n"; + $failsuggestion = + [ grep { $_->[0] ne 'quilt-mode' } @$failsuggestion ] + if $all_gdr; print STDERR "$us: $_->[1]\n" foreach @$failsuggestion; fail "quilt history linearisation failed. Search \`quilt fixup' in dgit(7).\n"; @@ -5924,7 +5931,7 @@ END push @failsuggestion, [ 'quilt-mode', "Maybe you need to specify one of". " --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?" ], [ 'origs', - "Or, maybe orig tarball(s) are not identical to git representation?" ]; + "Maybe orig tarball(s) are not identical to git representation?" ]; if (quiltmode_splitbrain()) { quiltify_splitbrain($clogp, $unapplied, $headref, $oldtiptree, |