Get the branch set right before listing names and handling --delete.
[rsync/rsync.git] / packaging / branch-from-patch
index e555f00..469f3d6 100755 (executable)
@@ -13,6 +13,9 @@ use Getopt::Long;
 );
 &usage if $help_opt;
 
+require 'packaging/git-status.pl';
+check_git_state($master_branch, !$skip_branch_check, 1);
+
 my %local_branch;
 open PIPE, '-|', 'git branch -l' or die "Unable to fork: $!\n";
 while (<PIPE>) {
@@ -30,9 +33,6 @@ if ($delete_local_branches) {
     %local_branch = ( );
 }
 
-require 'packaging/git-status.pl';
-check_git_state($master_branch, !$skip_branch_check, 1);
-
 my @patch_list;
 foreach (@ARGV) {
     if (!-f $_) {