Re: Make ref resolution saner

From: Jeff King <peff@peff.net>
Date: 2006-09-12 15:36:16
On Mon, Sep 11, 2006 at 08:17:35PM -0700, Linus Torvalds wrote:

> 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

I assume your patch is against master; it looks like there's exactly one
call to resolve_ref that's in next but not master. One-liner fix below.

-Peff

-- >8 --
wt-status: use simplified resolve_ref to find current branch

---
 wt-status.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wt-status.c b/wt-status.c
index ec2c728..e2f49c7 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -41,7 +41,7 @@ void wt_status_prepare(struct wt_status 
 
 	s->is_initial = get_sha1("HEAD", sha1) ? 1 : 0;
 
-	head = resolve_ref(git_path("HEAD"), sha1, 0);
+	head = resolve_ref("HEAD", sha1, 0);
 	s->branch = head ?
 		    strdup(head + strlen(get_git_dir()) + 1) :
 		    NULL;
-- 
1.4.2.g39f1

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Sep 12 15:36:22 2006

This archive was generated by hypermail 2.1.8 : 2006-09-12 15:37:03 EST