diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-21 16:04:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-21 16:04:36 -0700 |
commit | 2f18b4642d6ea052cb6ad85f3a013a33b6afbe92 (patch) | |
tree | be5891465cb3be2f2a539c688625a08f8670a236 /refs.h | |
parent | 470bbbc4dc6a135fd08083c1bd87699ac1b3f742 (diff) | |
parent | c5f29abd8098275382ff56d8cbb00d660a64b43e (diff) | |
download | git-2f18b4642d6ea052cb6ad85f3a013a33b6afbe92.tar.gz |
Merge branch 'mh/ref-api'
* mh/ref-api:
clear_ref_cache(): inline function
write_ref_sha1(): only invalidate the loose ref cache
clear_ref_cache(): extract two new functions
clear_ref_cache(): rename parameter
invalidate_ref_cache(): expose this function in the refs API
invalidate_ref_cache(): take the submodule as parameter
invalidate_ref_cache(): rename function from invalidate_cached_refs()
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -80,6 +80,14 @@ extern void unlock_ref(struct ref_lock *lock); /** Writes sha1 into the ref specified by the lock. **/ extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg); +/* + * Invalidate the reference cache for the specified submodule. Use + * submodule=NULL to invalidate the cache for the main module. This + * function must be called if references are changed via a mechanism + * other than the refs API. + */ +extern void invalidate_ref_cache(const char *submodule); + /** Setup reflog before using. **/ int log_ref_setup(const char *ref_name, char *logfile, int bufsize); |