aboutsummaryrefslogtreecommitdiff
path: root/index-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-28 14:38:36 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-28 14:38:36 -0800
commit77b50ab009deab7f8eb703843a71ac7253b977c8 (patch)
treece1cd978189ff7f50efbf8e6d41895e89b6a6e11 /index-pack.c
parent1db8b60b2a6ef0cc0f7cc7d0783b7cda2ce894ca (diff)
parent64d99e9c5a4a3fb35d803894992764a6e288de5d (diff)
downloadgit-77b50ab009deab7f8eb703843a71ac7253b977c8.tar.gz
git-77b50ab009deab7f8eb703843a71ac7253b977c8.tar.xz
Merge branch 'js/bundle'
* js/bundle: bundle: reword missing prerequisite error message git-bundle: record commit summary in the prerequisite data git-bundle: fix 'create --all' git-bundle: avoid fork() in verify_bundle() git-bundle: assorted fixes Add git-bundle: move objects and references by archive
Diffstat (limited to 'index-pack.c')
-rw-r--r--index-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/index-pack.c b/index-pack.c
index 9f8f0cad2..cf81a9950 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -463,7 +463,8 @@ static void parse_pack_objects(unsigned char *sha1)
/* If input_fd is a file, we should have reached its end now. */
if (fstat(input_fd, &st))
die("cannot fstat packfile: %s", strerror(errno));
- if (S_ISREG(st.st_mode) && st.st_size != consumed_bytes)
+ if (S_ISREG(st.st_mode) &&
+ lseek(input_fd, 0, SEEK_CUR) - input_len != st.st_size)
die("pack has junk at the end");
if (!nr_deltas)