From: Pavel Roskin <proski@gnu.org>
To: git <git@vger.kernel.org>
Subject: [PATCH] Disable USE_SYMLINK_HEAD by default
Date: Tue, 15 Nov 2005 00:59:50 -0500 [thread overview]
Message-ID: <1132034390.22207.18.camel@dv> (raw)
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
next reply other threads:[~2005-11-15 6:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 5:59 Pavel Roskin [this message]
2005-11-15 7:03 ` [PATCH] Disable USE_SYMLINK_HEAD by default 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1132034390.22207.18.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).