@@ -26,7 +26,7 @@ static const char upload_pack_usage[] = "git-upload-pack [--strict] [--timeout=n
2626static unsigned long oldest_have ;
2727
2828static int multi_ack , nr_our_refs ;
29- static int use_thin_pack , use_ofs_delta ;
29+ static int use_thin_pack , use_ofs_delta , no_progress ;
3030static struct object_array have_obj ;
3131static struct object_array want_obj ;
3232static unsigned int timeout ;
@@ -164,6 +164,9 @@ static void create_pack_file(void)
164164 die ("git-upload-pack: unable to fork git-pack-objects" );
165165 }
166166 if (!pid_pack_objects ) {
167+ const char * argv [10 ];
168+ int i = 0 ;
169+
167170 dup2 (lp_pipe [0 ], 0 );
168171 dup2 (pu_pipe [1 ], 1 );
169172 dup2 (pe_pipe [1 ], 2 );
@@ -174,9 +177,16 @@ static void create_pack_file(void)
174177 close (pu_pipe [1 ]);
175178 close (pe_pipe [0 ]);
176179 close (pe_pipe [1 ]);
177- execl_git_cmd ("pack-objects" , "--stdout" , "--progress" ,
178- use_ofs_delta ? "--delta-base-offset" : NULL ,
179- NULL );
180+
181+ argv [i ++ ] = "pack-objects" ;
182+ argv [i ++ ] = "--stdout" ;
183+ if (!no_progress )
184+ argv [i ++ ] = "--progress" ;
185+ if (use_ofs_delta )
186+ argv [i ++ ] = "--delta-base-offset" ;
187+ argv [i ++ ] = NULL ;
188+
189+ execv_git_cmd (argv );
180190 kill (pid_rev_list , SIGKILL );
181191 die ("git-upload-pack: unable to exec git-pack-objects" );
182192 }
@@ -537,6 +547,8 @@ static void receive_needs(void)
537547 use_sideband = LARGE_PACKET_MAX ;
538548 else if (strstr (line + 45 , "side-band" ))
539549 use_sideband = DEFAULT_PACKET_MAX ;
550+ if (strstr (line + 45 , "no-progress" ))
551+ no_progress = 1 ;
540552
541553 /* We have sent all our refs already, and the other end
542554 * should have chosen out of them; otherwise they are
@@ -605,7 +617,7 @@ static void receive_needs(void)
605617static int send_ref (const char * refname , const unsigned char * sha1 , int flag , void * cb_data )
606618{
607619 static const char * capabilities = "multi_ack thin-pack side-band"
608- " side-band-64k ofs-delta shallow" ;
620+ " side-band-64k ofs-delta shallow no-progress " ;
609621 struct object * o = parse_object (sha1 );
610622
611623 if (!o )
0 commit comments