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
Родитель b0df15a15d 0b90b881e0
Коммит d085f9773a
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

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

1
t/helper/.gitignore поставляемый
Просмотреть файл

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