aboutsummaryrefslogtreecommitdiffstats
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-15 14:23:12 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-19 09:50:57 -0700
commit415e96c8b7e7d47f98a45ae1b6d524418245a3b4 (patch)
tree08f5f8433a6d56642b64fe9ab941647da6c8aef5 /cache.h
parent875d0f8ddb1d420f6465498842740c4f5ab03e6f (diff)
downloadgit-415e96c8b7e7d47f98a45ae1b6d524418245a3b4.tar.gz
[PATCH] Implement git-checkout-cache -u to update stat information in the cache.
With -u flag, git-checkout-cache picks up the stat information from newly created file and updates the cache. This removes the need to run git-update-cache --refresh immediately after running git-checkout-cache. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 858ea7ff0c..2cfaa1959d 100644
--- a/cache.h
+++ b/cache.h
@@ -127,6 +127,15 @@ extern int remove_file_from_cache(char *path);
extern int ce_same_name(struct cache_entry *a, struct cache_entry *b);
extern int ce_match_stat(struct cache_entry *ce, struct stat *st);
extern int index_fd(unsigned char *sha1, int fd, struct stat *st);
+extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
+
+struct cache_file {
+ struct cache_file *next;
+ char lockfile[PATH_MAX];
+};
+extern int hold_index_file_for_update(struct cache_file *, const char *path);
+extern int commit_index_file(struct cache_file *);
+extern void rollback_index_file(struct cache_file *);
#define MTIME_CHANGED 0x0001
#define CTIME_CHANGED 0x0002