From be66a6c43dcba42c56f66a8706721a76098f8e25 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 25 Apr 2009 11:57:14 +0200 Subject: Add an option not to use link(src, dest) && unlink(src) when that is unreliable It seems that accessing NTFS partitions with ufsd (at least on my EeePC) has an unnerving bug: if you link() a file and unlink() it right away, the target of the link() will have the correct size, but consist of NULs. It seems as if the calls are simply not serialized correctly, as single-stepping through the function move_temp_to_file() works flawlessly. As ufsd is "Commertial software" (sic!), I cannot fix it, and have to work around it in Git. At the same time, it seems that this fixes msysGit issues 222 and 229 to assume that Windows cannot handle link() && unlink(). Signed-off-by: Johannes Schindelin Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano --- config.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index 8c1ae598a..1750cfb85 100644 --- a/config.c +++ b/config.c @@ -495,6 +495,11 @@ static int git_default_core_config(const char *var, const char *value) return 0; } + if (!strcmp(var, "core.unreliablehardlinks")) { + unreliable_hardlinks = git_config_bool(var, value); + return 0; + } + /* Add other config variables here and to Documentation/config.txt. */ return 0; } -- cgit v1.2.1