core.logallrefupdates thinko-fix
diff --git a/refs.c b/refs.c
index 75a0d7b..3d100df 100644
--- a/refs.c
+++ b/refs.c
@@ -731,7 +731,7 @@
 
 	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));