diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-05-26 13:24:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-26 13:24:46 -0700 |
commit | 38ccaf93bbf5a99dbff908068292ffaa5bafe25e (patch) | |
tree | cd1b379e0ebd26c6b5576e023c67338c41462d4e /builtin/commit.c | |
parent | Merge branch 'rs/plug-leak-in-pack-bitmaps' (diff) | |
parent | git-status.txt: advertisement for untracked cache (diff) | |
download | tgif-38ccaf93bbf5a99dbff908068292ffaa5bafe25e.tar.xz |
Merge branch 'nd/untracked-cache'
Teach the index to optionally remember already seen untracked files
to speed up "git status" in a working tree with tons of cruft.
* nd/untracked-cache: (24 commits)
git-status.txt: advertisement for untracked cache
untracked cache: guard and disable on system changes
mingw32: add uname()
t7063: tests for untracked cache
update-index: test the system before enabling untracked cache
update-index: manually enable or disable untracked cache
status: enable untracked cache
untracked-cache: temporarily disable with $GIT_DISABLE_UNTRACKED_CACHE
untracked cache: mark index dirty if untracked cache is updated
untracked cache: print stats with $GIT_TRACE_UNTRACKED_STATS
untracked cache: avoid racy timestamps
read-cache.c: split racy stat test to a separate function
untracked cache: invalidate at index addition or removal
untracked cache: load from UNTR index extension
untracked cache: save to an index extension
ewah: add convenient wrapper ewah_serialize_strbuf()
untracked cache: don't open non-existent .gitignore
untracked cache: mark what dirs should be recursed/saved
untracked cache: record/validate dir mtime and reuse cached output
untracked cache: make a wrapper around {open,read,close}dir()
...
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index d6515a2a50..254477fd1d 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1366,13 +1366,14 @@ int cmd_status(int argc, const char **argv, const char *prefix) refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, &s.pathspec, NULL, NULL); fd = hold_locked_index(&index_lock, 0); - if (0 <= fd) - update_index_if_able(&the_index, &index_lock); s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0; s.ignore_submodule_arg = ignore_submodule_arg; wt_status_collect(&s); + if (0 <= fd) + update_index_if_able(&the_index, &index_lock); + if (s.relative_paths) s.prefix = prefix; |