Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-10-26 03:41:20 +0400
committerJunio C Hamano <junkio@cox.net>2005-10-26 10:49:43 +0400
commit9e48b389990c0201487e58f3bac32734a59a7e89 (patch)
treedf8ff167b771bfe3058426f294729bfab21152ee /sha1_file.c
parent303958dc42d451aead0e1b9cf7b9836831a05f4b (diff)
Work around missing hard links on FAT formatted media
FAT -- like Coda -- does not like cross-directory hard links. To be precise, FAT does not like links at all. But links are not needed either. So get rid of them. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index e45679975e..7fdc46969d 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1239,11 +1239,14 @@ int move_temp_to_file(const char *tmpfile, char *filename)
* won't be able to check collisions, but that's not a
* big deal.
*
+ * The same holds for FAT formatted media.
+ *
* When this succeeds, we just return 0. We have nothing
* left to unlink.
*/
- if (ret == EXDEV && !rename(tmpfile, filename))
+ if ((ret == EXDEV || ret == ENOTSUP) && !rename(tmpfile, filename))
return 0;
+ ret = errno;
}
unlink(tmpfile);
if (ret) {