author | Junio C Hamano <gitster@pobox.com> | |
Sun, 27 Mar 2011 03:13:16 +0000 (20:13 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 27 Mar 2011 03:13:16 +0000 (20:13 -0700) |
* jc/index-update-if-able:
update $GIT_INDEX_FILE when there are racily clean entries
diff/status: refactor opportunistic index update
update $GIT_INDEX_FILE when there are racily clean entries
diff/status: refactor opportunistic index update
1 | 2 | |||
---|---|---|---|---|
builtin/commit.c | patch | | diff1 | | diff2 | | blob | history |
builtin/diff.c | patch | | diff1 | | diff2 | | blob | history |
cache.h | patch | | diff1 | | diff2 | | blob | history |
read-cache.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/commit.c
index 3979b823ef4227aac641be48c47581c56423b9d7,0b6ce2fa3757b0d052ee28d716687a70e1c4ca37..54b20497b120bc2bf5ee6e4904eca0ca5d83ff4f
--- 1/builtin/commit.c
--- 2/builtin/commit.c
+++ b/builtin/commit.c
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
fd = hold_locked_index(&index_lock, 0);
- if (0 <= fd) {
- if (active_cache_changed &&
- !write_cache(fd, active_cache, active_nr))
- commit_locked_index(&index_lock);
- else
- rollback_lock_file(&index_lock);
- }
+ if (0 <= fd)
+ update_index_if_able(&the_index, &index_lock);
s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
- s.in_merge = in_merge;
s.ignore_submodule_arg = ignore_submodule_arg;
wt_status_collect(&s);
diff --cc builtin/diff.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc read-cache.c
Simple merge