tag.c: use 'ref-filter' data structures
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 7a4fa90e8ccb50edc830686194c0f707037ffdb1..402521e34dec3b9e215d1aaf18cc9a387955995e 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -735,6 +735,32 @@ extern char *git_pathdup_submodule(const char *path, const char *fmt, ...)
 
 extern void report_linked_checkout_garbage(void);
 
+/*
+ * You can define a static memoized git path like:
+ *
+ *    static GIT_PATH_FUNC(git_path_foo, "FOO");
+ *
+ * or use one of the global ones below.
+ */
+#define GIT_PATH_FUNC(func, filename) \
+       const char *func(void) \
+       { \
+               static char *ret; \
+               if (!ret) \
+                       ret = git_pathdup(filename); \
+               return ret; \
+       }
+
+const char *git_path_cherry_pick_head(void);
+const char *git_path_revert_head(void);
+const char *git_path_squash_msg(void);
+const char *git_path_merge_msg(void);
+const char *git_path_merge_rr(void);
+const char *git_path_merge_mode(void);
+const char *git_path_merge_head(void);
+const char *git_path_fetch_head(void);
+const char *git_path_shallow(void);
+
 /*
  * Return the name of the file in the local object database that would
  * be used to store a loose object with the specified sha1.  The