aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-06-01 12:45:10 -0700
committerJunio C Hamano <gitster@pobox.com>2015-06-01 12:45:11 -0700
commit152722f155165cbeca43c7e82abe68e66d088b33 (patch)
tree5812a9e9b1ff1c2b134feac290ce9094b1c6b632 /sha1_file.c
parent6e0ac8e45f688abf8deb10a1716461b61400f669 (diff)
parentf6a1e1e288d13472f5f7fe2b907bb8c0bd69a018 (diff)
downloadgit-152722f155165cbeca43c7e82abe68e66d088b33.tar.gz
git-152722f155165cbeca43c7e82abe68e66d088b33.tar.xz
Merge branch 'jh/filter-empty-contents'
The clean/smudge interface did not work well when filtering an empty contents (failed and then passed the empty input through). It can be argued that a filter that produces anything but empty for an empty input is nonsense, but if the user wants to do strange things, then why not? * jh/filter-empty-contents: sha1_file: pass empty buffer to index empty file
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index ccc6dac54..7e38148fe 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -3286,7 +3286,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))