Merge branch 'cw/log-updates-for-all-refs-really'
The "core.logAllRefUpdates" that used to be boolean has been enhanced to take 'always' as well, to record ref updates to refs other than the ones that are expected to be updated (i.e. branches, remote-tracking branches and notes). * cw/log-updates-for-all-refs-really: doc: add note about ignoring '--no-create-reflog' update-ref: add test cases for bare repository refs: add option core.logAllRefUpdates = always config: add markup to core.logAllRefUpdates doc
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user