All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <johannes.sixt@telecom.at>
To: git@vger.kernel.org
Cc: Johannes Sixt <johannes.sixt@telecom.at>
Subject: [PATCH] Add a flag core.symlinks analogous to core.filemode.
Date: Tue, 27 Feb 2007 22:41:37 +0100	[thread overview]
Message-ID: <11726125033437-git-send-email-johannes.sixt@telecom.at> (raw)
In-Reply-To: <11726125012895-git-send-email-johannes.sixt@telecom.at>

The new flag core.symlinks (which is true by default) can be set to false
to indicate that the filesystem does not support symbolic links. In this
case, symbolic links that exist in the trees are checked out as small plain
files and checking in modifications of these files preserve the symlink
property in the database (as long as an entry exists in the index).

This commit as the first of a series starts by adding and initializing
the global flag variable.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 cache.h       |    1 +
 config.c      |    5 +++++
 environment.c |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cache.h b/cache.h
index 04f8e63..6cbb9d8 100644
--- a/cache.h
+++ b/cache.h
@@ -202,6 +202,7 @@ extern int delete_ref(const char *, unsigned char *sha1);
 /* Environment bits from configuration mechanism */
 extern int use_legacy_headers;
 extern int trust_executable_bit;
+extern int trust_symlink_fmt;
 extern int assume_unchanged;
 extern int prefer_symlink_refs;
 extern int log_all_ref_updates;
diff --git a/config.c b/config.c
index c938aa0..749bec3 100644
--- a/config.c
+++ b/config.c
@@ -269,6 +269,11 @@ int git_default_config(const char *var, const char *value)
 		return 0;
 	}
 
+	if (!strcmp(var, "core.symlinks")) {
+		trust_symlink_fmt = git_config_bool(var, value);
+		return 0;
+	}
+
 	if (!strcmp(var, "core.bare")) {
 		is_bare_repository_cfg = git_config_bool(var, value);
 		return 0;
diff --git a/environment.c b/environment.c
index 54c22f8..1e8292a 100644
--- a/environment.c
+++ b/environment.c
@@ -13,6 +13,7 @@ char git_default_email[MAX_GITNAME];
 char git_default_name[MAX_GITNAME];
 int use_legacy_headers = 1;
 int trust_executable_bit = 1;
+int trust_symlink_fmt = 1;
 int assume_unchanged;
 int prefer_symlink_refs;
 int is_bare_repository_cfg = -1; /* unspecified */
-- 
1.5.0.19.gddff

  reply	other threads:[~2007-02-27 21:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-27 21:41 Implement core.symlinks to support filesystems without symlinks Johannes Sixt
2007-02-27 21:41 ` Johannes Sixt [this message]
2007-02-27 21:41   ` [PATCH] Do not change the file type if the filesystem does not support symlinks Johannes Sixt
2007-02-27 21:41     ` [PATCH] Create a symbolic link as a regular file on filesystems without symlinks Johannes Sixt
2007-02-27 21:41       ` [PATCH] diff-lib.c: Ignore type differences if the filesystem does not support symlinks Johannes Sixt
2007-02-27 21:41         ` [PATCH] Describe core.symlinks in the man pages Johannes Sixt
2007-02-27 22:44       ` [PATCH] Create a symbolic link as a regular file on filesystems without symlinks Johannes Schindelin
2007-02-28 17:18         ` Johannes Sixt
2007-02-27 22:54     ` [PATCH] Do not change the file type if the filesystem does not support symlinks Johannes Schindelin
2007-02-28 17:40       ` Johannes Sixt
2007-02-28 17:53         ` Johannes Schindelin
2007-02-27 23:13 ` Implement core.symlinks to support filesystems without symlinks Robin Rosenberg
2007-02-28  0:07   ` Johannes Schindelin
2007-02-28 22:48     ` Robin Rosenberg
2007-03-01  1:18       ` Johannes Schindelin
2007-03-01 11:56         ` Robin Rosenberg
2007-03-01 17:13           ` Johannes Schindelin
2007-03-01 19:24           ` Johannes Sixt

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=11726125033437-git-send-email-johannes.sixt@telecom.at \
    --to=johannes.sixt@telecom.at \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.