Specifically:
* When running git status --porcelain, pass --ignored so it
lists ignored files, and handle the ! output that it then
produces.
* Add missing -f to a few git add invocations.
I have done some greps ('git.*add', 'git.*status', 'porcelain', etc.)
to try to find other missed cases and none turned up.
git diff is OK because normally we pass two treeish arguments, in
which case the ignores are ignored by git diff. When we are asking it
to look at the working tree, we are expecting it to ignore untracked
files (whether ignored or not), and diff tracked ones, which is what
it does.
Closes:#903130.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit (5.8~) unstable; urgency=medium
Bugfixes:
dgit (5.8~) unstable; urgency=medium
Bugfixes:
+ * dgit, git-debrebase: Properly make patches even if an awkward
+ .gitignore ignores the things in debian/patches. Closes:#903130.
* dgit(1): Unscramble push[-source] descriptions. Closes:#903116.
--
* dgit(1): Unscramble push[-source] descriptions. Closes:#903116.
--
}
sub commit_quilty_patch () {
}
sub commit_quilty_patch () {
- my $output = cmdoutput @git, qw(status --porcelain);
+ my $output = cmdoutput @git, qw(status --ignored --porcelain);
my %adds;
foreach my $l (split /\n/, $output) {
next unless $l =~ m/\S/;
my %adds;
foreach my $l (split /\n/, $output) {
next unless $l =~ m/\S/;
- if ($l =~ m{^(?:\?\?| [MADRC]) (.pc|debian/patches)}) {
+ if ($l =~ m{^(?:[?!][?!]| [MADRC]) (.pc|debian/patches)}) {
print SERIES "\n" or die $! unless $newline eq "\n";
print SERIES "auto-gitignore\n" or die $!;
close SERIES or die $!;
print SERIES "\n" or die $! unless $newline eq "\n";
print SERIES "auto-gitignore\n" or die $!;
close SERIES or die $!;
- runcmd @git, qw(add -- debian/patches/series), $gipatch;
+ runcmd @git, qw(add -f -- debian/patches/series), $gipatch;
commit_admin <<END
Commit patch to update .gitignore
commit_admin <<END
Commit patch to update .gitignore
{ local ($!,$?); copy('../gbp-pq-err', \*STDERR); }
failedcmd @gbp_cmd;
}
{ local ($!,$?); copy('../gbp-pq-err', \*STDERR); }
failedcmd @gbp_cmd;
}
- runcmd @git, qw(add debian/patches);
+ runcmd @git, qw(add -f debian/patches);