summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef176ad)
raw | patch | inline | side by side (parent: ef176ad)
author | Jeff King <peff@peff.net> | |
Mon, 18 Sep 2006 02:13:56 +0000 (19:13 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 18 Sep 2006 02:13:56 +0000 (19:13 -0700) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
wt-status.c | patch | blob | history |
diff --git a/wt-status.c b/wt-status.c
index 4b74e6858400108fe4967cfd371d20915d806379..050922df54de483cf7112aeb397fc555e4eb2310 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
s->is_initial = get_sha1("HEAD", sha1) ? 1 : 0;
- head = resolve_ref(git_path("HEAD"), sha1, 0);
- s->branch = head ?
- strdup(head + strlen(get_git_dir()) + 1) :
- NULL;
+ head = resolve_ref("HEAD", sha1, 0);
+ s->branch = head ? xstrdup(head) : NULL;
s->reference = "HEAD";
s->amend = 0;