diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-07-16 11:25:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-16 11:25:40 -0700 |
commit | 788cef81d40070d5755490441abad1a27bc120b7 (patch) | |
tree | ebc44e5c83def9855aac4559e87f201882d8f955 /test-scrap-cache-tree.c | |
parent | e0a064a10749a8039f28e9bd3de0ffb5cf99e678 (diff) | |
parent | 3e52f70b1505956bf91cb7b107e526d1c67da0a6 (diff) | |
download | git-788cef81d40070d5755490441abad1a27bc120b7.tar.gz |
Merge branch 'nd/split-index'
An experiment to use two files (the base file and incremental
changes relative to it) to represent the index to reduce I/O cost
of rewriting a large index when only small part of the working tree
changes.
* nd/split-index: (32 commits)
t1700: new tests for split-index mode
t2104: make sure split index mode is off for the version test
read-cache: force split index mode with GIT_TEST_SPLIT_INDEX
read-tree: note about dropping split-index mode or index version
read-tree: force split-index mode off on --index-output
rev-parse: add --shared-index-path to get shared index path
update-index --split-index: do not split if $GIT_DIR is read only
update-index: new options to enable/disable split index mode
split-index: strip pathname of on-disk replaced entries
split-index: do not invalidate cache-tree at read time
split-index: the reading part
split-index: the writing part
read-cache: mark updated entries for split index
read-cache: save deleted entries in split index
read-cache: mark new entries for split index
read-cache: split-index mode
read-cache: save index SHA-1 after reading
entry.c: update cache_changed if refresh_cache is set in checkout_entry()
cache-tree: mark istate->cache_changed on prime_cache_tree()
cache-tree: mark istate->cache_changed on cache tree update
...
Diffstat (limited to 'test-scrap-cache-tree.c')
-rw-r--r-- | test-scrap-cache-tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test-scrap-cache-tree.c b/test-scrap-cache-tree.c index 4728013910..9ebcbca9d2 100644 --- a/test-scrap-cache-tree.c +++ b/test-scrap-cache-tree.c @@ -6,12 +6,11 @@ static struct lock_file index_lock; int main(int ac, char **av) { - int fd = hold_locked_index(&index_lock, 1); + hold_locked_index(&index_lock, 1); if (read_cache() < 0) die("unable to read index file"); active_cache_tree = NULL; - if (write_cache(fd, active_cache, active_nr) - || commit_lock_file(&index_lock)) + if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK)) die("unable to write index file"); return 0; } |