X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=refs.h;h=3fd55369f90829706c3f4b11329fadc38380da32;hb=b15aa973b296ca36ae39592491bcb02944ac0f7a;hp=0229c57132f53b85e4d6af8b62627383a49527ac;hpb=1020fbc2485d6c1c144d321b68fcf37269e67917;p=git.git diff --git a/refs.h b/refs.h index 0229c5713..3fd55369f 100644 --- a/refs.h +++ b/refs.h @@ -10,8 +10,9 @@ struct ref_lock { int force_write; }; -#define REF_ISSYMREF 01 -#define REF_ISPACKED 02 +#define REF_ISSYMREF 0x01 +#define REF_ISPACKED 0x02 +#define REF_ISBROKEN 0x04 /* * Calls the specified function for each ref file until it returns nonzero, @@ -80,6 +81,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);