git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Disable USE_SYMLINK_HEAD by default
@ 2005-11-15  5:59 Pavel Roskin
  2005-11-15  7:03 ` Junio C Hamano
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Roskin @ 2005-11-15  5:59 UTC (permalink / raw)
  To: git

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>

---
Applying this patch before 1.0 may be controversial, but I think there
is a very good reason for that.  There should be exactly one git 1.0
repository format.  Now we have two that are present in the sources and
that have received testing from the git users.

Of those two formats, I prefer the one that is platform independent and
not very demanding with regard to filesystems and transfer protocols.
That format should be good enough so that we don't plan to change it as
soon as version 1.0 is released. Any third party software claiming to
support git 1.0 should need to support one repository format.


diff --git a/Makefile b/Makefile
index 63cb998..585552e 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,10 @@
 #
 # Define NO_STRCASESTR if you don't have strcasestr.
 #
+# Define USE_SYMLINK_HEAD if you want .git/HEAD to be a symbolic link.
+# This feature is phased out, enable it only for compatibility with other
+# software.  Don't enable it on Windows.
+#
 # Define PPC_SHA1 environment variable when running make to make use of
 # a bundled SHA1 routine optimized for PowerPC.
 #
@@ -210,7 +214,6 @@ ifeq ($(uname_O),Cygwin)
 	NEEDS_LIBICONV = YesPlease
 	NO_IPV6 = YesPlease
 	X = .exe
-	ALL_CFLAGS += -DUSE_SYMLINK_HEAD=0
 endif
 ifeq ($(uname_S),OpenBSD)
 	NO_STRCASESTR = YesPlease
diff --git a/refs.c b/refs.c
index a52b038..9b88742 100644
--- a/refs.c
+++ b/refs.c
@@ -6,10 +6,6 @@
 /* We allow "recursive" symbolic refs. Only within reason, though */
 #define MAXDEPTH 5
 
-#ifndef USE_SYMLINK_HEAD
-#define USE_SYMLINK_HEAD 1
-#endif
-
 int validate_symref(const char *path)
 {
 	struct stat st;
@@ -120,7 +116,7 @@ int create_symref(const char *git_HEAD, 
 	char ref[1000];
 	int fd, len, written;
 
-#if USE_SYMLINK_HEAD
+#ifdef USE_SYMLINK_HEAD
 	unlink(git_HEAD);
 	if (!symlink(refs_heads_master, git_HEAD))
 		return 0;


-- 
Regards,
Pavel Roskin

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-11-16  3:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-15  5:59 [PATCH] Disable USE_SYMLINK_HEAD by default Pavel Roskin
2005-11-15  7:03 ` Junio C Hamano
2005-11-15  8:13   ` Pavel Roskin
2005-11-15  8:24     ` Junio C Hamano
2005-11-15 10:24       ` Junio C Hamano
2005-11-15 11:09         ` Johannes Schindelin
2005-11-15 12:18           ` Petr Baudis
2005-11-15 14:24             ` Johannes Schindelin
2005-11-15 15:37               ` Adrien Beau
2005-11-15 16:50               ` Pavel Roskin
2005-11-15 17:05             ` Junio C Hamano
2005-11-15 17:21               ` Pavel Roskin
2005-11-15 17:32                 ` Nick Hengeveld
2005-11-15 17:33                 ` Linus Torvalds
2005-11-15 17:42                   ` Petr Baudis
2005-11-15 18:01                     ` Linus Torvalds
2005-11-15 18:13                 ` Junio C Hamano
2005-11-15 17:06             ` Pavel Roskin
2005-11-15 18:21               ` Junio C Hamano
2005-11-16  1:56                 ` Pavel Roskin
2005-11-16  3:13                   ` Junio C Hamano
2005-11-16  1:05             ` Josef Weidendorfer
2005-11-15 10:31     ` Catalin Marinas
2005-11-15 16:27       ` Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).