diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-10 19:46:40 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-16 16:47:48 +0100 |
commit | 048c26164775aaf523086e60b4a975279341c3e2 (patch) | |
tree | e7fba7b950aac303d1e793cf569deb3bbf094c36 | |
parent | 365c05e1ecc2bdf4dcf96d7c726f68aaf40888f2 (diff) |
Split brain: Fix unapplied tree handling
Do the quiltify_splitbrain_needed if there _are_ patches, not if there
aren't. And if we're told it was an unapplied tree, check that HEAD
and orig are indeed the same (excluding debian/*, of course) and print
a useful message if not.
-rwxr-xr-x | dgit | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -2578,9 +2578,20 @@ sub quiltify_splitbrain ($$$$$$) { local $ENV{GIT_COMMITTER_NAME} = $authline[0]; local $ENV{GIT_COMMITTER_EMAIL} = $authline[1]; local $ENV{GIT_COMMITTER_DATE} = $authline[2]; + if ($quilt_mode =~ m/gbp|unapplied/ && - ($diffbits->{O2A} & 01) && # some patches - !($diffbits->{H2O} & 01)) { # but HEAD is like orig + ($diffbits->{H2O} & 01)) { + my $msg = + "--quilt=$quilt_mode specified, implying patches-unapplied git tree\n". + " but git tree differs from orig in upstream files."; + if (!stat_exists "debian/patches") { + $msg .= + "\n ... debian/patches is missing; perhaps this is a patch queue branch?"; + } + fail $msg; + } + if ($quilt_mode =~ m/gbp|unapplied/ && + ($diffbits->{O2A} & 01)) { # some patches quiltify_splitbrain_needed(); progress "creating patches-applied version using gbp-pq"; open STDOUT, ">/dev/null" or die $!; |