aboutsummaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-11-29 17:15:48 -0500
committerJunio C Hamano <junkio@cox.net>2006-11-29 19:06:53 -0800
commit67c08ce14fb488562666ab896541ad75f1bdcca6 (patch)
tree06062fba179c853a31896bd3c121e49ca7060e59 /builtin-pack-objects.c
parent03f99c03f806ca13b5974450409426c04af220f2 (diff)
downloadgit-67c08ce14fb488562666ab896541ad75f1bdcca6.tar.gz
git-67c08ce14fb488562666ab896541ad75f1bdcca6.tar.xz
pack-objects: remove redundent status information
The final 'nr_result' and 'written' values must always be the same otherwise we're in deep trouble. So let's remove a redundent report. And for paranoia sake let's make sure those two variables are actually equal after all objects are written (one never knows). Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 753bcd57b..a2dc7d1d9 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -514,6 +514,8 @@ static void write_pack_file(void)
if (do_progress)
fputc('\n', stderr);
done:
+ if (written != nr_result)
+ die("wrote %d objects while expecting %d", written, nr_result);
sha1close(f, pack_file_sha1, 1);
}
@@ -1662,7 +1664,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
}
}
if (progress)
- fprintf(stderr, "Total %d, written %d (delta %d), reused %d (delta %d)\n",
- nr_result, written, written_delta, reused, reused_delta);
+ fprintf(stderr, "Total %d (delta %d), reused %d (delta %d)\n",
+ written, written_delta, reused, reused_delta);
return 0;
}