core.logallrefupdates thinko-fix
authorJunio C Hamano <junkio@cox.net>
Tue, 10 Oct 2006 04:15:59 +0000 (21:15 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 10 Oct 2006 04:15:59 +0000 (21:15 -0700)
refs.c

diff --git a/refs.c b/refs.c
index 75a0d7b064618539e7bbe94d81b913beb4314dd5..3d100df85c4ca9f2f54c22a5c771014a8ba10f38 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -731,7 +731,7 @@ static int log_ref_write(struct ref_lock *lock,
 
        logfd = open(lock->log_file, oflags, 0666);
        if (logfd < 0) {
-               if (!log_all_ref_updates && errno == ENOENT)
+               if (!(oflags & O_CREAT) && errno == ENOENT)
                        return 0;
                return error("Unable to append to %s: %s",
                        lock->log_file, strerror(errno));