summaryrefslogtreecommitdiff
path: root/builtin/repack.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-09-15 15:33:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-09-17 20:34:56 (GMT)
commitffc9329f48cb05ab44592e75e2dac4cfb7951c00 (patch)
tree9b04419bfb92b7f86d2884b1eea66b16e024f019 /builtin/repack.c
parenta1bbc6c0176f1fa2d4aa571cc0183a1f0ff9b285 (diff)
downloadgit-ffc9329f48cb05ab44592e75e2dac4cfb7951c00.zip
git-ffc9329f48cb05ab44592e75e2dac4cfb7951c00.tar.gz
git-ffc9329f48cb05ab44592e75e2dac4cfb7951c00.tar.bz2
repack: retain the return value of pack-objects
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>
Diffstat (limited to 'builtin/repack.c')
-rw-r--r--builtin/repack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 52846f8..9f4c782 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -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");
@@ -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)