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@xxxxxxxxxxxxxx> --- refs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/refs.c b/refs.c index 31a2057..116eb59 100644 --- a/refs.c +++ b/refs.c @@ -974,7 +974,7 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg) int log = !lstat(git_path("logs/%s", oldref), &loginfo); const char *symref = NULL; - 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); -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html