diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2005-11-15 19:24:19 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-15 11:42:29 -0800 |
commit | f8348be3be8493a62110a09ab0343213990b416b (patch) | |
tree | efad0bc70473bdc02b8ac6a5e5f001519f1d5dfa /refs.c | |
parent | 4a4e6fd74f7d4564ed43eaaf59b6bd70c1959f1a (diff) | |
download | git-f8348be3be8493a62110a09ab0343213990b416b.tar.gz |
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>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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); |