Re: More problems...
- From
- Russell King <rmk@arm.linux.org.uk>
- Date
- Apr 29, 2005, 21:19 UTC
- Message-ID
- <20050429221903.F30010@flint.arm.linux.org.uk>
- In-Reply-To
- <7vhdhp47hq.fsf@assigned-by-dhcp.cox.net>
On Fri, Apr 29, 2005 at 02:07:29PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> >>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes: > > LT> Absolutely. I use the same "git-pull-script" between two local directories > LT> on disk... > LT> Of course, I don't bother with the linking. But that's the trivial part. > > Would it be useful if somebody wrote local-pull.c similar to > http-pull.c, which clones one local SHA_FILE_DIRECTORY to > another, with an option to (1) try hardlink and if it fails > fail; (2) try hardlink and if it fails try symlink and if it > fails fail; (3) try hardlink and if it fails try copy and if it > fails fail?
What would be nice is if it finds an existing file for the one it's trying to hard link, it compares the contents (maybe - is this actually necessary?) and if identical, it removes the original file replacing it with a hard link.
This means that you'll always be trying to maintain the hard linked structure between various working trees in the background.
But maybe this should have an option to enable this behaviour.
-- Russell King