aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-09-15 23:10:42 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-05 13:45:31 -0700
commit7cb368421f62318f2c0f0e19a83ca34c201aebaa (patch)
tree63bf86657d679c342fc9525cef68b50b99f116ea /refs.c
parentf989fea0e0b47873de62a355f4766f03a88fb01b (diff)
downloadgit-7cb368421f62318f2c0f0e19a83ca34c201aebaa.tar.gz
git-7cb368421f62318f2c0f0e19a83ca34c201aebaa.tar.xz
resolve_ref(): expand documentation
Record information about resolve_ref(), hard-won via reverse engineering, in a comment for future spelunkers. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/refs.c b/refs.c
index 0baa500cb..096b42c5e 100644
--- a/refs.c
+++ b/refs.c
@@ -482,18 +482,6 @@ static int get_packed_ref(const char *ref, unsigned char *sha1)
return -1;
}
-/*
- * If the "reading" argument is set, this function finds out what _object_
- * the ref points at by "reading" the ref. The ref, if it is not symbolic,
- * has to exist, and if it is symbolic, it has to point at an existing ref,
- * because the "read" goes through the symref to the ref it points at.
- *
- * The access that is not "reading" may often be "writing", but does not
- * have to; it can be merely checking _where it leads to_. If it is a
- * prelude to "writing" to the ref, a write to a symref that points at
- * yet-to-be-born ref will create the real ref pointed by the symref.
- * reading=0 allows the caller to check where such a symref leads to.
- */
const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *flag)
{
int depth = MAXDEPTH;