Merge branch 'jc/bare'
* jc/bare: Disallow working directory commands in a bare repository. git-fetch: allow updating the current branch in a bare repository. Introduce is_bare_repository() and core.bare configuration variable Move initialization of log_all_ref_updates
This commit is contained in:
3
refs.c
3
refs.c
@ -923,6 +923,9 @@ static int log_ref_write(struct ref_lock *lock,
|
||||
char *logrec;
|
||||
const char *committer;
|
||||
|
||||
if (log_all_ref_updates < 0)
|
||||
log_all_ref_updates = !is_bare_repository();
|
||||
|
||||
if (log_all_ref_updates &&
|
||||
(!strncmp(lock->ref_name, "refs/heads/", 11) ||
|
||||
!strncmp(lock->ref_name, "refs/remotes/", 13))) {
|
||||
|
||||
Reference in New Issue
Block a user