1
0
mirror of https://github.com/git/git.git synced 2024-09-30 05:32:08 +02:00

core.logallrefupdates thinko-fix

This commit is contained in:
Junio C Hamano 2006-10-09 21:15:59 -07:00
parent b3d4204fc4
commit 1974bf620b

2
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));