X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=5e9d7114bd3b143c40d76aec609c0b3c52ad4923;hp=2a3d9ac45cbb7909002bccd1750ad7d8b4b4a1c2;hb=b9ef2453ea950bd60ddb52e2253cdf762f34534d;hpb=3553a7c60866f392445d7bbf2ed028f3f92da33d diff --git a/dgit b/dgit index 2a3d9ac4..5e9d7114 100755 --- a/dgit +++ b/dgit @@ -311,7 +311,7 @@ sub branch_is_gdr_unstitched_ff ($$$) { my ($symref, $head, $ancestor) = @_; my ($ffq_prev, $gdrlast) = branch_gdr_info($symref, $head); return 0 unless $ffq_prev; - return 0 unless is_fast_fwd $ancestor, $ffq_prev; + return 0 unless !defined $ancestor or is_fast_fwd $ancestor, $ffq_prev; return 1; } @@ -4235,6 +4235,15 @@ END my $actualhead = git_rev_parse('HEAD'); if (branch_is_gdr_unstitched_ff($symref, $actualhead, $archive_hash)) { + if (quiltmode_splitbrain()) { + my ($ffq_prev, $gdrlast) = branch_gdr_info($symref, $actualhead); + fail <($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"; @@ -5920,10 +5936,15 @@ END push @failsuggestion, [ 'applied', "This might be a patches-applied branch." ]; } - 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?" ]; + push @failsuggestion, [ 'quilt-mode', + "Maybe you need one of --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?" ]; + + push @failsuggestion, [ 'gitattrs', + "Warning: Tree has .gitattributes. See GITATTRIBUTES in dgit(7)." ] + if stat_exists '.gitattributes'; + + push @failsuggestion, [ 'origs', + "Maybe orig tarball(s) are not identical to git representation?" ]; if (quiltmode_splitbrain()) { quiltify_splitbrain($clogp, $unapplied, $headref, $oldtiptree,