Add config variable core.symrefsonly
This allows you to force git to avoid symlinks for refs. Just add something like [core] symrefsonly = true to .git/config. Don´t forget to "git checkout your_branch", or it does not do anything... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
4a4e6fd74f
commit
f8348be3be
10
refs.c
10
refs.c
@ -121,10 +121,12 @@ int create_symref(const char *git_HEAD, const char *refs_heads_master)
|
||||
int fd, len, written;
|
||||
|
||||
#if USE_SYMLINK_HEAD
|
||||
unlink(git_HEAD);
|
||||
if (!symlink(refs_heads_master, git_HEAD))
|
||||
return 0;
|
||||
fprintf(stderr, "no symlink - falling back to symbolic ref\n");
|
||||
if (!only_use_symrefs) {
|
||||
unlink(git_HEAD);
|
||||
if (!symlink(refs_heads_master, git_HEAD))
|
||||
return 0;
|
||||
fprintf(stderr, "no symlink - falling back to symbolic ref\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
len = snprintf(ref, sizeof(ref), "ref: %s\n", refs_heads_master);
|
||||
|
Reference in New Issue
Block a user