summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 760c451)
raw | patch | inline | side by side (parent: 760c451)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Mon, 17 Oct 2011 02:38:10 +0000 (04:38 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 17 Oct 2011 04:12:04 +0000 (21:12 -0700) |
Since write_ref_sha1() can only write loose refs and cannot write
symbolic refs, there is no need for it to invalidate the packed ref
cache.
Suggested by: Martin Fick <mfick@codeaurora.org>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
symbolic refs, there is no need for it to invalidate the packed ref
cache.
Suggested by: Martin Fick <mfick@codeaurora.org>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c | patch | blob | history |
index 2a21dc344338a4dc69fe9785e04b2f9829c24afc..a888cea56eb6c8142f4a31e9214bf349965f3d66 100644 (file)
--- a/refs.c
+++ b/refs.c
unlock_ref(lock);
return -1;
}
- invalidate_ref_cache(NULL);
+ clear_loose_ref_cache(get_ref_cache(NULL));
if (log_ref_write(lock->ref_name, lock->old_sha1, sha1, logmsg) < 0 ||
(strcmp(lock->ref_name, lock->orig_ref_name) &&
log_ref_write(lock->orig_ref_name, lock->old_sha1, sha1, logmsg) < 0)) {