Code

pack-objects: simplify the condition associated with --all-progress
authorNicolas Pitre <nico@cam.org>
Fri, 2 May 2008 19:11:47 +0000 (15:11 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 4 May 2008 01:35:38 +0000 (18:35 -0700)
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c

index afbf3ddc6897ad92b6b00c425194f9924631249b..b4a63d2468c4cdf2f4853bca636a40ddbb0b763a 100644 (file)
@@ -452,11 +452,10 @@ static void write_pack_file(void)
        struct sha1file *f;
        off_t offset, offset_one, last_obj_offset = 0;
        struct pack_header hdr;
-       int do_progress = progress >> pack_to_stdout;
        uint32_t nr_remaining = nr_result;
        time_t last_mtime = 0;
 
-       if (do_progress)
+       if (progress > pack_to_stdout)
                progress_state = start_progress("Writing objects", nr_result);
        written_list = xmalloc(nr_objects * sizeof(*written_list));