From: Wayne Davison Date: Sun, 23 Mar 2008 14:33:24 +0000 (-0700) Subject: Properly handle a new patch-branch that is only available locally. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/a5e0bf35795dde0e5f9b509ba09d9e28dbfb530b Properly handle a new patch-branch that is only available locally. --- diff --git a/support/patch-update b/support/patch-update index e2fe8c93..f6eb47fe 100755 --- a/support/patch-update +++ b/support/patch-update @@ -55,19 +55,21 @@ if ($incl_generated_files) { } my $last_touch = time; -my(@patches, %local_patch); +my(%patches, %local_patch); # Start by finding all patches so that we can load all possible parents. open(PIPE, '-|', 'git', 'branch', '-a') or die $!; while () { if (m# origin/patch/(.*)#) { - push(@patches, $1); + $patches{$1} = 1; } elsif (m# patch/(.*)#) { - $local_patch{$1} = 1; + $patches{$1} = $local_patch{$1} = 1; } } close PIPE; +my @patches = sort keys %patches; + my(%parent, %description); foreach my $patch (@patches) { my $branch = ($local_patch{$patch} ? '' : 'origin/') . "patch/$patch";