diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | dgit | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index aa98a41..591ee67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ dgit (4.2~) experimental; urgency=medium Sean Whitton] Closes:#856402. Minor fixes: + * When source discrepancy involves file mode changes, report them + specially. Closes:#886442. * In split brain mode, with unexpected diffs, print dgit view commitid in suggested diff rune. (HEAD is wrong.) Closes:#886443. * Fix message about missing quilt cache entry to refer to @@ -4240,7 +4240,35 @@ END if ($r==256) { my $referent = $split_brain ? $dgithead : 'HEAD'; my $diffs = cmdoutput @git, qw(diff --stat), $tree, $dgithead; - fail <<END + + my @mode_changes; + my $raw = cmdoutput @git, + qw(diff --no-renames -z -r --raw), $tree, $dgithead; + my $changed; + foreach (split /\0/, $raw) { + if (defined $changed) { + push @mode_changes, "$changed: $_\n" if $changed; + $changed = undef; + next; + } elsif (m/^:0+ 0+ /) { + $changed = ''; + } elsif (m/^:(?:10*)?(\d+) (?:10*)?(\d+) /) { + $changed = "Mode change from $1 to $2" + } else { + die "$_ ?"; + } + } + if (@mode_changes) { + fail <<END.(join '', @mode_changes).<<END; +HEAD specifies a different tree to $dscfn: +$diffs +END +There is a problem with your source tree (see dgit(7) for some hints). +To see a full diff, run git diff $tree $referent +END + } + + fail <<END; HEAD specifies a different tree to $dscfn: $diffs Perhaps you forgot to build. Or perhaps there is a problem with your |