diff options
author | Wayne Davison <wayned@samba.org> | 2008-02-04 00:12:01 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2008-02-04 00:12:01 -0800 |
commit | 970ce063ee0c17b69ee5343d6934faab479f6ed8 (patch) | |
tree | 85ca1c376076834b247406751685c891c8e708ea /support | |
parent | dd1f0da818d33508999298954172f347e4dbf450 (diff) | |
download | rsync-970ce063ee0c17b69ee5343d6934faab479f6ed8.tar.gz |
Fixed finding of parent's description when @ARGV doesn't mention it.
Diffstat (limited to 'support')
-rwxr-xr-x | support/patch-update | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/support/patch-update b/support/patch-update index 502380df..a76f111d 100755 --- a/support/patch-update +++ b/support/patch-update @@ -56,16 +56,9 @@ if ($incl_generated_files) { my $last_touch = time; my(@patches, %local_patch); -if (@ARGV) { - foreach (@ARGV) { - s{^(patches|patch|origin/patch)/} {}; - s{\.diff$} {}; - push(@patches, $_); - } - open(PIPE, '-|', 'git', 'branch', '-l') or die $!; -} else { - open(PIPE, '-|', 'git', 'branch', '-a') or die $!; -} + +# Start by finding all patches so that we can load all possible parents. +open(PIPE, '-|', 'git', 'branch', '-a') or die $!; while (<PIPE>) { if (m# origin/patch/(.*)#) { push(@patches, $1); @@ -93,6 +86,16 @@ foreach my $patch (@patches) { $description{$patch} = $desc; } +if (@ARGV) { + # Limit the list of patches to actually process based on @ARGV. + @patches = ( ); + foreach (@ARGV) { + s{^(patches|patch|origin/patch)/} {}; + s{\.diff$} {}; + push(@patches, $_); + } +} + my %completed; foreach my $patch (@patches) { next if $completed{$patch}++; |