Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- upload-pack.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index dc464d7..e432e83 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -160,8 +160,9 @@ static void create_pack_file(void) ssize_t sz; const char *argv[10]; int arg = 0; + int internal_rev_list = shallow_nr; - if (shallow_nr) { + if (internal_rev_list) { memset(&rev_list, 0, sizeof(rev_list)); rev_list.proc = do_rev_list; rev_list.out = -1; @@ -187,7 +188,7 @@ static void create_pack_file(void) argv[arg++] = NULL; memset(&pack_objects, 0, sizeof(pack_objects)); - pack_objects.in = shallow_nr ? rev_list.out : -1; + pack_objects.in = internal_rev_list ? rev_list.out : -1; pack_objects.out = -1; pack_objects.err = -1; pack_objects.git_cmd = 1; @@ -197,7 +198,7 @@ static void create_pack_file(void) die("git upload-pack: unable to fork git-pack-objects"); /* pass on revisions we (don't) want */ - if (!shallow_nr) { + if (!internal_rev_list) { FILE *pipe_fd = xfdopen(pack_objects.in, "w"); if (!create_full_pack) { int i; @@ -311,7 +312,7 @@ static void create_pack_file(void) error("git upload-pack: git-pack-objects died with error."); goto fail; } - if (shallow_nr && finish_async(&rev_list)) + if (internal_rev_list && finish_async(&rev_list)) goto fail; /* error was already reported */ /* flush the data */ -- 1.7.1.rc1.69.g24c2f7 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html