chiark / gitweb /
git-debrebase: convert-from-*: snag on discarding comments in series
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 20:11:40 +0000 (21:11 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 20:11:40 +0000 (21:11 +0100)
series files can contain #-comments.  The conversion process will
throw them away, so complain about that.

Closes: #907198.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index ddb47bf..5fabfd6 100755 (executable)
@@ -2449,7 +2449,14 @@ sub check_series_has_all_patches ($) {
        [qw(blob missing)];
     $series //= '';
     my %series;
+    our $comments_snagged;
     foreach my $f (grep /\S/, grep {!m/^\s\#/} split /\n/, $series) {
+       if ($f =~ m/^\s*\#/) {
+           snag 'series-comments',
+               "$seriesfn contains comments, which will be discarded"
+               unless $comments_snagged++;
+           next;
+       }
        fail "patch $f repeated in $seriesfn !" if $series{$f}++;
     }
     foreach my $patchfile (get_tree "$head:debian/patches", 1,1) {