@@ -659,7 +659,7 @@ static int get_pack(struct fetch_pack_args *args,
659
659
const char * argv [22 ];
660
660
char keep_arg [256 ];
661
661
char hdr_arg [256 ];
662
- const char * * av ;
662
+ const char * * av , * cmd_name ;
663
663
int do_keep = args -> keep_pack ;
664
664
struct child_process cmd ;
665
665
int ret ;
@@ -706,7 +706,7 @@ static int get_pack(struct fetch_pack_args *args,
706
706
if (do_keep ) {
707
707
if (pack_lockfile )
708
708
cmd .out = -1 ;
709
- * av ++ = "index-pack" ;
709
+ * av ++ = cmd_name = "index-pack" ;
710
710
* av ++ = "--stdin" ;
711
711
if (!args -> quiet && !args -> no_progress )
712
712
* av ++ = "-v" ;
@@ -723,7 +723,7 @@ static int get_pack(struct fetch_pack_args *args,
723
723
* av ++ = "--check-self-contained-and-connected" ;
724
724
}
725
725
else {
726
- * av ++ = "unpack-objects" ;
726
+ * av ++ = cmd_name = "unpack-objects" ;
727
727
if (args -> quiet || args -> no_progress )
728
728
* av ++ = "-q" ;
729
729
args -> check_self_contained_and_connected = 0 ;
@@ -741,7 +741,7 @@ static int get_pack(struct fetch_pack_args *args,
741
741
cmd .in = demux .out ;
742
742
cmd .git_cmd = 1 ;
743
743
if (start_command (& cmd ))
744
- die ("fetch-pack: unable to fork off %s" , argv [ 0 ] );
744
+ die ("fetch-pack: unable to fork off %s" , cmd_name );
745
745
if (do_keep && pack_lockfile ) {
746
746
* pack_lockfile = index_pack_lockfile (cmd .out );
747
747
close (cmd .out );
@@ -753,7 +753,7 @@ static int get_pack(struct fetch_pack_args *args,
753
753
args -> check_self_contained_and_connected &&
754
754
ret == 0 ;
755
755
else
756
- die ("%s failed" , argv [ 0 ] );
756
+ die ("%s failed" , cmd_name );
757
757
if (use_sideband && finish_async (& demux ))
758
758
die ("error in sideband demultiplexer" );
759
759
return 0 ;
0 commit comments