diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-16 14:33:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-16 14:33:44 -0700 |
commit | 070d276cc15494184d2004d506e663f0cb791d44 (patch) | |
tree | 66fda933738d92a0730ed73902a3f0fad0dd04cd /sha1_file.c | |
parent | 659d4c8fb21902660acd52f9e77170e82774b9ff (diff) | |
parent | f6a1e1e288d13472f5f7fe2b907bb8c0bd69a018 (diff) | |
download | git-070d276cc15494184d2004d506e663f0cb791d44.tar.gz |
Merge branch 'jh/filter-empty-contents' into maint
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c index 001537c935..ac0ca1a0a2 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -3202,7 +3202,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)) |