diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2009-04-25 11:57:14 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-25 09:49:21 -0700 |
commit | be66a6c43dcba42c56f66a8706721a76098f8e25 (patch) | |
tree | 99afe341425abb4ca307ced1fc5efbf05075d993 /environment.c | |
parent | 785a9857496ae1b71b168f6d79306ca233ec0cd6 (diff) | |
download | git-be66a6c43dcba42c56f66a8706721a76098f8e25.tar.gz |
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 <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/environment.c b/environment.c index 4696885b22..10578d24d7 100644 --- a/environment.c +++ b/environment.c @@ -43,6 +43,10 @@ unsigned whitespace_rule_cfg = WS_DEFAULT_RULE; enum branch_track git_branch_track = BRANCH_TRACK_REMOTE; enum rebase_setup_type autorebase = AUTOREBASE_NEVER; enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED; +#ifndef UNRELIABLE_HARDLINKS +#define UNRELIABLE_HARDLINKS 0 +#endif +int unreliable_hardlinks = UNRELIABLE_HARDLINKS; /* Parallel index stat data preload? */ int core_preload_index = 0; |