@@ -659,7 +659,7 @@ static int get_pack(struct fetch_pack_args *args,
659659 const char * argv [22 ];
660660 char keep_arg [256 ];
661661 char hdr_arg [256 ];
662- const char * * av ;
662+ const char * * av , * cmd_name ;
663663 int do_keep = args -> keep_pack ;
664664 struct child_process cmd ;
665665 int ret ;
@@ -706,7 +706,7 @@ static int get_pack(struct fetch_pack_args *args,
706706 if (do_keep ) {
707707 if (pack_lockfile )
708708 cmd .out = -1 ;
709- * av ++ = "index-pack" ;
709+ * av ++ = cmd_name = "index-pack" ;
710710 * av ++ = "--stdin" ;
711711 if (!args -> quiet && !args -> no_progress )
712712 * av ++ = "-v" ;
@@ -723,7 +723,7 @@ static int get_pack(struct fetch_pack_args *args,
723723 * av ++ = "--check-self-contained-and-connected" ;
724724 }
725725 else {
726- * av ++ = "unpack-objects" ;
726+ * av ++ = cmd_name = "unpack-objects" ;
727727 if (args -> quiet || args -> no_progress )
728728 * av ++ = "-q" ;
729729 args -> check_self_contained_and_connected = 0 ;
@@ -741,7 +741,7 @@ static int get_pack(struct fetch_pack_args *args,
741741 cmd .in = demux .out ;
742742 cmd .git_cmd = 1 ;
743743 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 );
745745 if (do_keep && pack_lockfile ) {
746746 * pack_lockfile = index_pack_lockfile (cmd .out );
747747 close (cmd .out );
@@ -753,7 +753,7 @@ static int get_pack(struct fetch_pack_args *args,
753753 args -> check_self_contained_and_connected &&
754754 ret == 0 ;
755755 else
756- die ("%s failed" , argv [ 0 ] );
756+ die ("%s failed" , cmd_name );
757757 if (use_sideband && finish_async (& demux ))
758758 die ("error in sideband demultiplexer" );
759759 return 0 ;
0 commit comments