symbolit-ref: fix resolve_ref conversion.
authorJunio C Hamano <junkio@cox.net>
Thu, 21 Sep 2006 04:10:17 +0000 (21:10 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 21 Sep 2006 04:10:17 +0000 (21:10 -0700)
An earlier conversion accidentally hardcoded "HEAD" to be passed to
resolve_ref(), thereby causing git-symbolic-ref command to always
report where the HEAD points at, ignoring the command line parameter.

Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-symbolic-ref.c

index 6f18db870a2e4ea020034533243617ceb6275afa..13163baa88e87db469ba111b748696c24b5ffd0d 100644 (file)
@@ -7,7 +7,7 @@ static const char git_symbolic_ref_usage[] =
 static void check_symref(const char *HEAD)
 {
        unsigned char sha1[20];
-       const char *refs_heads_master = resolve_ref("HEAD", sha1, 0);
+       const char *refs_heads_master = resolve_ref(HEAD, sha1, 0);
 
        if (!refs_heads_master)
                die("No such ref: %s", HEAD);