aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-06 12:51:49 -0700
committerJunio C Hamano <junkio@cox.net>2006-06-06 14:30:58 -0700
commit021b6e454944a4fba878651ebf9bfe0a3f6c3077 (patch)
tree125f7ae01b9c959782e345baa03c7c786cc3f4ce /cache.h
parentdd8239f997962d94162790039b008acb6068a242 (diff)
downloadgit-021b6e454944a4fba878651ebf9bfe0a3f6c3077.tar.gz
git-021b6e454944a4fba878651ebf9bfe0a3f6c3077.tar.xz
Make index file locking code reusable to others.
The framework to create lockfiles that are removed at exit is first used to reliably write the index file, but it is applicable to other things, so stop calling it "cache_file". This also rewords a few remaining error message that called the index file "cache file". Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/cache.h b/cache.h
index d530af97c..d5d7fe4f8 100644
--- a/cache.h
+++ b/cache.h
@@ -167,13 +167,13 @@ extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);
#define REFRESH_IGNORE_MISSING 0x0008 /* ignore non-existent */
extern int refresh_cache(unsigned int flags);
-struct cache_file {
- struct cache_file *next;
- char lockfile[PATH_MAX];
+struct lock_file {
+ struct lock_file *next;
+ char filename[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 *);
+extern int hold_lock_file_for_update(struct lock_file *, const char *path);
+extern int commit_lock_file(struct lock_file *);
+extern void rollback_lock_file(struct lock_file *);
/* Environment bits from configuration mechanism */
extern int trust_executable_bit;