index-pack: remove dead code (it should never happen)
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 26 May 2013 01:16:16 +0000 (08:16 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 15:07:03 +0000 (08:07 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/index-pack.c
index 79dfe47320e244c3110ce65d5b19fa87ebca3cb5..f52a04f64532558e166a7fa0372996ec7f990792 100644 (file)
@@ -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