@@ -1230,7 +1230,6 @@ static const char *pack_lockfile;
1230
1230
static const char * unpack (int err_fd , struct shallow_info * si )
1231
1231
{
1232
1232
struct pack_header hdr ;
1233
- struct argv_array av = ARGV_ARRAY_INIT ;
1234
1233
const char * hdr_err ;
1235
1234
int status ;
1236
1235
char hdr_arg [38 ];
@@ -1253,16 +1252,16 @@ static const char *unpack(int err_fd, struct shallow_info *si)
1253
1252
1254
1253
if (si -> nr_ours || si -> nr_theirs ) {
1255
1254
alt_shallow_file = setup_temporary_shallow (si -> shallow );
1256
- argv_array_pushl (& av , "--shallow-file" , alt_shallow_file , NULL );
1255
+ argv_array_push (& child .args , "--shallow-file" );
1256
+ argv_array_push (& child .args , alt_shallow_file );
1257
1257
}
1258
1258
1259
1259
if (ntohl (hdr .hdr_entries ) < unpack_limit ) {
1260
- argv_array_pushl (& av , "unpack-objects" , hdr_arg , NULL );
1260
+ argv_array_pushl (& child . args , "unpack-objects" , hdr_arg , NULL );
1261
1261
if (quiet )
1262
- argv_array_push (& av , "-q" );
1262
+ argv_array_push (& child . args , "-q" );
1263
1263
if (fsck_objects )
1264
- argv_array_push (& av , "--strict" );
1265
- child .argv = av .argv ;
1264
+ argv_array_push (& child .args , "--strict" );
1266
1265
child .no_stdout = 1 ;
1267
1266
child .err = err_fd ;
1268
1267
child .git_cmd = 1 ;
@@ -1277,13 +1276,12 @@ static const char *unpack(int err_fd, struct shallow_info *si)
1277
1276
if (gethostname (keep_arg + s , sizeof (keep_arg ) - s ))
1278
1277
strcpy (keep_arg + s , "localhost" );
1279
1278
1280
- argv_array_pushl (& av , "index-pack" ,
1279
+ argv_array_pushl (& child . args , "index-pack" ,
1281
1280
"--stdin" , hdr_arg , keep_arg , NULL );
1282
1281
if (fsck_objects )
1283
- argv_array_push (& av , "--strict" );
1282
+ argv_array_push (& child . args , "--strict" );
1284
1283
if (fix_thin )
1285
- argv_array_push (& av , "--fix-thin" );
1286
- child .argv = av .argv ;
1284
+ argv_array_push (& child .args , "--fix-thin" );
1287
1285
child .out = -1 ;
1288
1286
child .err = err_fd ;
1289
1287
child .git_cmd = 1 ;
0 commit comments