1
0
mirror of https://github.com/git/git.git synced 2024-11-18 17:03:56 +01:00

Merge branch 'kw/write-index-reduce-alloc'

A hotfix to a topic already in 'master'.

* kw/write-index-reduce-alloc:
  read-cache: fix index corruption with index v4
  Add t/helper/test-write-cache to .gitignore
This commit is contained in:
Junio C Hamano 2017-09-25 15:24:05 +09:00
commit d085f9773a
2 changed files with 4 additions and 1 deletions

@ -2103,7 +2103,9 @@ static int ce_write_entry(git_SHA_CTX *c, int fd, struct cache_entry *ce,
if (!result)
result = ce_write(c, fd, to_remove_vi, prefix_size);
if (!result)
result = ce_write(c, fd, ce->name + common, ce_namelen(ce) - common + 1);
result = ce_write(c, fd, ce->name + common, ce_namelen(ce) - common);
if (!result)
result = ce_write(c, fd, padding, 1);
strbuf_splice(previous_name, common, to_remove,
ce->name + common, ce_namelen(ce) - common);

1
t/helper/.gitignore vendored

@ -35,3 +35,4 @@
/test-svn-fe
/test-urlmatch-normalization
/test-wildmatch
/test-write-cache