chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit: Refactor and simplify `quilt fixup cannot be linear' generation
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 4f38d9c2be7690c0c6136c6075eb8b751c19ef69..2ac6d51c6506af9980dc418c767e7cfe4fa0720c 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-5519,19
+5519,14
@@
sub quiltify ($$$$) {
$x =~ s/(.*?[0-9a-z]{8})[0-9a-z]*$/$1/;
return $x;
};
$x =~ s/(.*?[0-9a-z]{8})[0-9a-z]*$/$1/;
return $x;
};
- my $reportnot = sub {
- my ($notp) = @_;
- my $s = $abbrev->($notp);
- my $c = $notp->{Child};
- $s .= "..".$abbrev->($c) if $c;
- $s .= ": ".$notp->{Whynot};
- return $s;
- };
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) {
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";
+ my $c = $notp->{Child};
+ my $cprange = $abbrev->($notp);
+ $cprange .= "..".$abbrev->($c) if $c;
+ print STDERR "$us: $cprange: $notp->{Whynot}\n";
$all_gdr &&= $notp->{Child} &&
(git_cat_file $notp->{Child}{Commit}, 'commit')
=~ m{^\[git-debrebase(?! split[: ]).*\]$}m;
$all_gdr &&= $notp->{Child} &&
(git_cat_file $notp->{Child}{Commit}, 'commit')
=~ m{^\[git-debrebase(?! split[: ]).*\]$}m;