summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aff4e8d)
raw | patch | inline | side by side (parent: aff4e8d)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Feb 2009 17:22:16 +0000 (09:22 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Feb 2009 17:22:16 +0000 (09:22 -0800) |
057e713 (Warn use of "origin" when remotes/origin/HEAD is dangling,
2009-02-08) tried to warn dangling refs/remotes/origin/HEAD only when
"origin" was used to refer to it. There was one corner case a symref is
expected to be dangling and this warning is unwarranted: HEAD in an empty
repository.
This squelches the warning for this special case.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-08) tried to warn dangling refs/remotes/origin/HEAD only when
"origin" was used to refer to it. There was one corner case a symref is
expected to be dangling and this warning is unwarranted: HEAD in an empty
repository.
This squelches the warning for this special case.
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 3bd2ef0e7cde84d9d425f510bb2c2d52e8b19e16..2f75179f4c6c1d05bdd7594b23dcf77007c26751 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
*ref = xstrdup(r);
if (!warn_ambiguous_refs)
break;
- } else if (flag & REF_ISSYMREF)
+ } else if ((flag & REF_ISSYMREF) &&
+ (len != 4 || strcmp(str, "HEAD")))
warning("ignoring dangling symref %s.", fullref);
}
free(last_branch);