Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
sha1_file: pass empty buffer to index empty file
[gitweb.git]
/
sha1_file.c
diff --git
a/sha1_file.c
b/sha1_file.c
index a38854ce553c1e59294d5542a37a5404ccd66dc5..6e2d6ec65b7e80f8e8800380146f4ba61cead190 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-3119,7
+3119,7
@@
static int index_core(unsigned char *sha1, int fd, size_t size,
int ret;
if (!size) {
- ret = index_mem(sha1,
NULL
, size, type, path, flags);
+ ret = index_mem(sha1,
""
, size, type, path, flags);
} else if (size <= SMALL_FILE_SIZE) {
char *buf = xmalloc(size);
if (size == read_in_full(fd, buf, size))