git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Johannes Sixt <j6t@kdbg.org>,
	git@vger.kernel.org
Subject: Re: [PATCH v3] Add an option not to use link(src, dest) && unlink(src) when that is unreliable
Date: Mon, 27 Apr 2009 12:55:25 -0700	[thread overview]
Message-ID: <7vljpl3m8i.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: alpine.LFD.2.00.0904270806130.22156@localhost.localdomain

Linus Torvalds <torvalds@linux-foundation.org> writes:

>> 	Junio, do you want me to remove the config variable?
>
> I'd keep it. But I'd suggest that the naming is odd. Why talk about 
> "unreliable hardlinks", when that's just a particular symptom. Why not 
> just talk about whether hardlinks should be used or not?
>
> And to avoid double negative, make it
>
> 	[core]
> 		usehardlinks = true/false
>
> and then default it to 'true' for Unix.

I am a bit worried about this name, too.  It may lead people to a
misunderstanding that we would do something magical when they do this with
the configuration set:

	wget http://some.where/huge-file.mpg 1.mpg
        ln 1.mpg 2.mpg
        git add 1.mpg 2.mpg
        rm -f 1.mpg 2.mpg
        git checkout-index -a
	ls -i ?.mpg

> The thing is, maybe people would prefer to use 'rename' over the
> link/unlink games even on some unixes, and not because of 'reliability'
> issues, but because they may have some filesystems that don't do
> hardlinks, and they'd just rather speed things up by avoiding the
> 'link()' system call that will just error out.

> So naming matters. Calling it 'unreliablehardlinks' in that case would be 
> odd. They're not unreliable - you just don't want to try to use them.

This part I agree with.

> I also do wonder if we could/should make this one of those options that 
> get set automatically at 'git init' time, rather than silently hardcoded 
> as a compile option. I thought hardlinks at least sometimes worked fine on 
> Windows too, don't they? 
>
> I do detest _hidden_ default values for config options, unless those 
> hidden defaults are "obviously always correct" as a default. This one 
> smells a bit uncertain, and as a result I think it's ok to default to not 
> using hardlinks, but doing it with .gitconfig would be nicer.

The coda hack comment in move_temp_to_file() shows what we can do to
autodetect (i.e. try cross directory hardlink), but I somehow thought that
we changed the code enough to ensure that we create the tmpfiles in the
same directory as their final destination?

  parent reply	other threads:[~2009-04-27 19:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23 10:53 [PATCH] Add an option not to use link(src, dest) && unlink(src) when that is unreliable Johannes Schindelin
2009-04-23 19:16 ` Johannes Sixt
2009-04-23 19:33   ` Johannes Schindelin
2009-04-25  9:57   ` [PATCH v2] " Johannes Schindelin
2009-04-25 16:49     ` Junio C Hamano
2009-04-25 17:40       ` Linus Torvalds
2009-04-25 18:38         ` Michael Gaber
2009-04-25 18:43           ` Linus Torvalds
2009-04-27  3:37           ` Jay Soffian
2009-04-25 18:50       ` Johannes Sixt
2009-04-25 17:05     ` Junio C Hamano
2009-04-26 17:39       ` Johannes Schindelin
2009-04-25 17:39     ` Linus Torvalds
2009-04-23 19:39 ` [PATCH] " Alex Riesen
2009-04-23 21:59   ` Johannes Schindelin
2009-04-24  5:44     ` Alex Riesen
2009-04-25 17:56 ` Linus Torvalds
2009-04-25 18:52   ` Johannes Sixt
2009-04-26  1:17     ` Junio C Hamano
2009-04-26 17:40       ` Johannes Schindelin
2009-04-27 12:00         ` [PATCH v3] " Johannes Schindelin
2009-04-27 15:15           ` Linus Torvalds
2009-04-27 16:11             ` Johannes Schindelin
2009-04-27 16:53               ` Linus Torvalds
2009-04-27 19:55             ` Junio C Hamano [this message]
2009-04-27 20:13               ` Linus Torvalds
2009-04-27 20:18               ` Linus Torvalds
2009-04-27 22:10                 ` Junio C Hamano
2009-04-27 22:28                   ` Johannes Schindelin
2009-04-27 23:06                     ` Linus Torvalds
2009-04-27 22:32                 ` [PATCH] Rename core.unreliableHardlinks to core.createObject Johannes Schindelin
2009-04-27 23:48                   ` Junio C Hamano
2009-04-28  8:23                     ` Johannes Schindelin
2009-04-28  8:44                       ` Junio C Hamano
2009-04-28 14:50                         ` Johannes Schindelin
2009-04-28 20:59                           ` Junio C Hamano
2009-04-28 22:07                             ` Johannes Schindelin
2009-04-26 17:38   ` [PATCH] Add an option not to use link(src, dest) && unlink(src) when that is unreliable Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vljpl3m8i.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).