-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 $!;
-}
+my(%patches, %local_patch);
+
+# Start by finding all patches so that we can load all possible parents.
+open(PIPE, '-|', 'git', 'branch', '-a') or die $!;