summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eca35a2)
raw | patch | inline | side by side (parent: eca35a2)
author | Miklos Vajna <vmiklos@frugalware.org> | |
Sun, 26 Oct 2008 02:33:57 +0000 (03:33 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 26 Oct 2008 21:43:26 +0000 (14:43 -0700) |
We tried to check if a reflog of a ref is a symlink without first
checking if it exists, which is a bug.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
checking if it exists, which is a bug.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c | patch | blob | history |
index b929301752c3081c7d42cea8e0297e663fe500cb..b39e6f2c2d7023c45cdc21d4d72064352201fa4d 100644 (file)
--- a/refs.c
+++ b/refs.c
const char *symref = NULL;
int is_symref = 0;
- if (S_ISLNK(loginfo.st_mode))
+ if (log && S_ISLNK(loginfo.st_mode))
return error("reflog for %s is a symlink", oldref);
symref = resolve_ref(oldref, orig_sha1, 1, &flag);