summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-22 07:36:35 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-11-22 07:37:35 (GMT)
commitf4204ab9f6a192cdb9a68150e031d7183688bfeb (patch)
tree3c9402e5a9e55dadf6477e44904fcc86fac7c8be /refs.h
parentcf0adba7885342e1bbcf0689fece9d13e39784b4 (diff)
downloadgit-f4204ab9f6a192cdb9a68150e031d7183688bfeb.zip
git-f4204ab9f6a192cdb9a68150e031d7183688bfeb.tar.gz
git-f4204ab9f6a192cdb9a68150e031d7183688bfeb.tar.bz2
Store peeled refs in packed-refs (take 2).
This fixes the previous implementation which failed to optimize repositories with tons of lightweight tags. The updated packed-refs format begins with "# packed-refs with:" line that lists the kind of extended data the file records. Currently, there is only one such extension defined, "peeled". This stores the "peeled tag" on a line that immediately follows a line for a tag object itself in the format "^<sha-1>". The header line itself and any extended data are ignored by older implementation, so packed-refs file generated with this version can still be used by older git. packed-refs made by older git can of course be used with this version. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/refs.h b/refs.h
index 40048a6..cd1e1d6 100644
--- a/refs.h
+++ b/refs.h
@@ -10,14 +10,13 @@ struct ref_lock {
int force_write;
};
+#define REF_ISSYMREF 01
+#define REF_ISPACKED 02
+
/*
* Calls the specified function for each ref file until it returns nonzero,
* and returns the value
*/
-#define REF_ISSYMREF 01
-#define REF_ISPACKED 02
-#define REF_ISPEELED 04 /* internal use */
-
typedef int each_ref_fn(const char *refname, const unsigned char *sha1, int flags, void *cb_data);
extern int head_ref(each_ref_fn, void *);
extern int for_each_ref(each_ref_fn, void *);