for-each-reflog: not having $GIT_DIR/logs directory is not an error.
authorJunio C Hamano <junkio@cox.net>
Tue, 13 Feb 2007 07:21:34 +0000 (23:21 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 13 Feb 2007 07:22:07 +0000 (23:22 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
refs.c

diff --git a/refs.c b/refs.c
index 9e3dfb3c974c893760a6bcb75ecc39026f74a23b..63877037893603c385e63547c83ea8c59f7c3101 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1251,7 +1251,7 @@ static int do_for_each_reflog(const char *base, each_ref_fn fn, void *cb_data)
                free(log);
                closedir(dir);
        }
-       else
+       else if (*base)
                return errno;
        return retval;
 }