diff options
Diffstat (limited to 'refs/files-backend.c')
-rw-r--r-- | refs/files-backend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 8ee2aba39f..c041d4ba21 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2682,7 +2682,7 @@ static int files_rename_ref(struct ref_store *ref_store, } flag = log_all_ref_updates; - log_all_ref_updates = 0; + log_all_ref_updates = LOG_REFS_NONE; if (write_ref_to_lockfile(lock, orig_sha1, &err) || commit_ref_update(refs, lock, orig_sha1, NULL, &err)) { error("unable to write current sha1 into %s: %s", oldrefname, err.buf); @@ -2835,8 +2835,8 @@ static int log_ref_write_1(const char *refname, const unsigned char *old_sha1, { int logfd, result, oflags = O_APPEND | O_WRONLY; - if (log_all_ref_updates < 0) - log_all_ref_updates = !is_bare_repository(); + if (log_all_ref_updates == LOG_REFS_UNSET) + log_all_ref_updates = is_bare_repository() ? LOG_REFS_NONE : LOG_REFS_NORMAL; result = log_ref_setup(refname, logfile, err, flags & REF_FORCE_CREATE_REFLOG); |