Get the branch set right before listing names and handling --delete.
authorWayne Davison <wayned@samba.org>
Sat, 19 Mar 2011 23:34:37 +0000 (16:34 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 19 Mar 2011 23:34:37 +0000 (16:34 -0700)
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 $_) {