Disable USE_SYMLINK_HEAD by default
Disable USE_SYMLINK_HEAD by default. Recommend using it only for compatibility with older software. Treat USE_SYMLINK_HEAD like other optional defines - check whether it's defined, not its value. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Pavel Roskin committed
Nov 15, 2005 at 00:59 UTC
2fabd217330ea6a5b5082e9e86b169e3401de889
2 files changed
+4
-6
Makefile
+3
-1
@@ -23,6 +23,9 @@ all:
23
#
24
# Define NO_SETENV if you don't have setenv in the C library.
25
#
26
+# Define USE_SYMLINK_HEAD if you want .git/HEAD to be a symbolic link.
27
+# Don't enable it on Windows.
28
+#
29
# Define PPC_SHA1 environment variable when running make to make use of
30
# a bundled SHA1 routine optimized for PowerPC.
31
#
@@ -236,7 +239,6 @@ ifeq ($(uname_O),Cygwin)
239
# NO_MMAP = YesPlease
240
NO_IPV6 = YesPlease
241
X = .exe
239
- ALL_CFLAGS += -DUSE_SYMLINK_HEAD=0
242
endif
243
ifeq ($(uname_S),OpenBSD)
244
NO_STRCASESTR = YesPlease
refs.c
+1
-5
@@ -6,10 +6,6 @@
6
/* We allow "recursive" symbolic refs. Only within reason, though */
7
#define MAXDEPTH 5
8
9
-#ifndef USE_SYMLINK_HEAD
10
-#define USE_SYMLINK_HEAD 1
11
-#endif
12
-
9
const char *resolve_ref(const char *path, unsigned char *sha1, int reading)
10
{
11
int depth = MAXDEPTH, len;
@@ -80,7 +76,7 @@ int create_symref(const char *git_HEAD, const char *refs_heads_master)
76
char ref[1000];
77
int fd, len, written;
78
83
-#if USE_SYMLINK_HEAD
79
+#ifdef USE_SYMLINK_HEAD
80
if (!only_use_symrefs) {
81
unlink(git_HEAD);
82
if (!symlink(refs_heads_master, git_HEAD))