Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
t4018-diff-funcname: demonstrate end of line funcname matching flaw
[gitweb.git]
/
sha1_file.c
diff --git
a/sha1_file.c
b/sha1_file.c
index 477d3fb4b06bcbcdd3f75a9e48d5945f91e1f3e6..e2cb342a32f31be2b9ffc1867fbfd671fe63cef1 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-2136,7
+2136,9
@@
static void write_sha1_file_prepare(const void *buf, unsigned long len,
*/
int move_temp_to_file(const char *tmpfile, const char *filename)
{
- int ret = link(tmpfile, filename);
+ int ret = 0;
+ if (link(tmpfile, filename))
+ ret = errno;
/*
* Coda hack - coda doesn't like cross-directory links,