summaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-05-26 01:16:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-28 15:07:03 (GMT)
commit920734b069b269937b25a692d21c1623cbaec4b0 (patch)
treecd4d7678161dcbf42e411aca3b72c85b1924748d /builtin/index-pack.c
parent6035d6aad8ca11954c0d7821f6f3e7c047039c8f (diff)
downloadgit-920734b069b269937b25a692d21c1623cbaec4b0.zip
git-920734b069b269937b25a692d21c1623cbaec4b0.tar.gz
git-920734b069b269937b25a692d21c1623cbaec4b0.tar.bz2
index-pack: remove dead code (it should never happen)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 79dfe47..f52a04f 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -747,8 +747,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
int eaten;
void *buf = (void *) data;
- if (!buf)
- buf = new_data = get_data_from_pack(obj_entry);
+ assert(data && "data can only be NULL for large _blobs_");
/*
* we do not need to free the memory here, as the