Browse Source

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
maint
Junio C Hamano 8 years ago
parent
commit
d085f9773a
  1. 4
      read-cache.c
  2. 1
      t/helper/.gitignore

4
read-cache.c

@ -2103,7 +2103,9 @@ static int ce_write_entry(git_SHA_CTX *c, int fd, struct cache_entry *ce, @@ -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 @@ @@ -35,3 +35,4 @@
/test-svn-fe
/test-urlmatch-normalization
/test-wildmatch
/test-write-cache

Loading…
Cancel
Save