summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2ca880f)
raw | patch | inline | side by side (parent: 2ca880f)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 24 Jul 2008 00:22:58 +0000 (17:22 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 24 Jul 2008 01:11:04 +0000 (18:11 -0700) |
f2eba66 (Enable HEAD@{...} and make it independent from the current
branch, 2007-02-03) introduced dwim_log() to handle <refname>@{...}
syntax, and as part of its processing, it checks if the ref exists by
calling refsolve_ref(). It should call it as a reader to make sure the
call returns NULL for a nonexistent ref (not as a potential writer in
which case it does not return NULL).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
branch, 2007-02-03) introduced dwim_log() to handle <refname>@{...}
syntax, and as part of its processing, it checks if the ref exists by
calling refsolve_ref(). It should call it as a reader to make sure the
call returns NULL for a nonexistent ref (not as a potential writer in
which case it does not return NULL).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c | patch | blob | history |
diff --git a/sha1_name.c b/sha1_name.c
index b0b2167578a7baebeba676af0b33161fb688bae0..4fb77f8863ec075de38b84171d3ef039a00cee4c 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
const char *ref, *it;
strcpy(path, mkpath(*p, len, str));
- ref = resolve_ref(path, hash, 0, NULL);
+ ref = resolve_ref(path, hash, 1, NULL);
if (!ref)
continue;
if (!stat(git_path("logs/%s", path), &st) &&