Skip to content

Commit

Permalink
repack: retain the return value of pack-objects
Browse files Browse the repository at this point in the history
During the review process of the previous commit (repack: rewrite the
shell script in C), Johannes Sixt proposed to retain any exit codes from
the sub-process, which makes it probably more obvious in case of failure.

As the commit before should behave as close to the original shell
script, the proposed change is put in this extra commit.
The infrastructure however was already setup in the previous commit.
(Having a local 'ret' variable)

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stefan Beller authored and Junio C Hamano committed Sep 17, 2013
1 parent a1bbc6c commit ffc9329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/repack.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)

ret = start_command(&cmd);
if (ret)
return 1;
return ret;

nr_packs = 0;
out = xfdopen(cmd.out, "r");
Expand All @@ -244,7 +244,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
fclose(out);
ret = finish_command(&cmd);
if (ret)
return 1;
return ret;
argv_array_clear(&cmd_args);

if (!nr_packs && !quiet)
Expand Down

0 comments on commit ffc9329

Please sign in to comment.