summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6e458bf)
raw | patch | inline | side by side (parent: 6e458bf)
author | Jürgen Rühle <j-r@online.de> | |
Tue, 2 Jan 2007 19:26:23 +0000 (20:26 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 3 Jan 2007 07:43:31 +0000 (23:43 -0800) |
We check the existence of the parent commit to determine whether the status is
requested for an initial commit. Since the parent commit depends on the
presence of the --amend switch do initial commit detection after command line
arguments have been handled.
Signed-off-by: Jürgen Rühle <j-r@online.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
requested for an initial commit. Since the parent commit depends on the
presence of the --amend switch do initial commit detection after command line
arguments have been handled.
Signed-off-by: Jürgen Rühle <j-r@online.de>
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 ca4690e86b8684eb38909d455f543cf5914e9098..9b777a569e9988e250378fc4d7745ba0316a329b 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
unsigned char sha1[20];
const char *head;
- s->is_initial = get_sha1("HEAD", sha1) ? 1 : 0;
-
head = resolve_ref("HEAD", sha1, 0, NULL);
s->branch = head ? xstrdup(head) : NULL;
void wt_status_print(struct wt_status *s)
{
+ unsigned char sha1[20];
+ s->is_initial = get_sha1(s->reference, sha1) ? 1 : 0;
+
if (s->branch)
color_printf_ln(color(WT_STATUS_HEADER),
"# On branch %s", s->branch);