aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-09-11 20:17:35 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-17 19:09:11 -0700
commited378ec7e85fd2c5cfcc7bd64b454236357fdd97 (patch)
tree76a1666618aff73fd9184a533273b1e083858a6d /cache.h
parentb37a562a1097af7403c649a5f903a93acaf279e8 (diff)
downloadgit-ed378ec7e85fd2c5cfcc7bd64b454236357fdd97.tar.gz
git-ed378ec7e85fd2c5cfcc7bd64b454236357fdd97.tar.xz
Make ref resolution saner
The old code used to totally mix up the notion of a ref-name and the path that that ref was associated with. That was not only horribly ugly (a number of users got the path, and then wanted to try to turn it back into a ref-name again), but it fundamnetally doesn't work at all once we do any setup where a ref doesn't have a 1:1 relationship with a particular pathname. This fixes things up so that we use the ref-name throughout, and only turn it into a pathname once we actually look it up in the filesystem. That makes a lot of things much clearer and more straightforward. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 57db7c9b2..282eed6f0 100644
--- a/cache.h
+++ b/cache.h
@@ -287,8 +287,8 @@ extern int get_sha1_hex(const char *hex, unsigned char *sha1);
extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */
extern int read_ref(const char *filename, unsigned char *sha1);
extern const char *resolve_ref(const char *path, unsigned char *sha1, int);
-extern int create_symref(const char *git_HEAD, const char *refs_heads_master);
-extern int validate_symref(const char *git_HEAD);
+extern int create_symref(const char *ref, const char *refs_heads_master);
+extern int validate_symref(const char *ref);
extern int base_name_compare(const char *name1, int len1, int mode1, const char *name2, int len2, int mode2);
extern int cache_name_compare(const char *name1, int len1, const char *name2, int len2);