Re: [PATCH v2] Add an option not to use link(src, dest) && unlink(src) when that is unreliable
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Apr 25, 2009, 17:40 UTC
- Message-ID
- <alpine.LFD.2.00.0904251039460.3101@localhost.localdomain>
- In-Reply-To
- <7vbpqkznjs.fsf@gitster.siamese.dyndns.org>
On Sat, 25 Apr 2009, Junio C Hamano wrote:
Show 7 quoted lines
> @@ -2225,7 +2225,9 @@ int move_temp_to_file(const char *tmpfile, const char *filename)
> {
> int ret = 0;
>
> - if (link(tmpfile, filename))
> + if (unreliable_hardlinks)
> + goto try_rename;Much better.
Linus