git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Anton Altaparmakov <aia21@cam.ac.uk>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Junio C Hamano <junkio@cox.net>,
	Linus Torvalds <torvalds@osdl.org>,
	Ryan Anderson <ryan@michonline.com>, Petr Baudis <pasky@ucw.cz>,
	git@vger.kernel.org
Subject: Re: More problems...
Date: Fri, 29 Apr 2005 22:57:53 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.60.0504292254430.25700@hermes-1.csi.cam.ac.uk> (raw)
In-Reply-To: <20050429221903.F30010@flint.arm.linux.org.uk>

On Fri, 29 Apr 2005, Russell King wrote:
> On Fri, Apr 29, 2005 at 02:07:29PM -0700, Junio C Hamano wrote:
> > >>>>> "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.

Unless I have completely misunderstood things, you never need to compare 
the file contents.  Just compare the file names.  If they match, i.e. the 
SHA1 is the same, the contents must match by definition.  So you only need 
a stat(), rather than read&decompress&compare.

> 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.

There should definitely be an option to either enable or disable this as 
there are legitimate cases for not wanting hard links or indeed using 
file systems which do not support them.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

  reply	other threads:[~2005-04-29 21:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29 16:01 More problems Russell King
2005-04-29 16:12 ` Russell King
2005-04-29 17:51   ` Linus Torvalds
2005-04-29 18:27 ` Petr Baudis
2005-04-29 19:50   ` Ryan Anderson
2005-04-29 20:03     ` Thomas Glanzmann
2005-04-29 20:21     ` Linus Torvalds
2005-04-29 21:07       ` Junio C Hamano
2005-04-29 21:19         ` Russell King
2005-04-29 21:57           ` Anton Altaparmakov [this message]
2005-05-02 19:33             ` Petr Baudis
2005-05-02 19:44               ` Dave Kleikamp
2005-05-02 19:51                 ` Thomas Glanzmann
2005-05-02 22:01               ` Anton Altaparmakov
2005-05-02 22:19                 ` Linus Torvalds
2005-05-03  1:48                   ` Petr Baudis
2005-05-03  2:56                     ` Daniel Barkalow
2005-05-03 15:00                     ` Andreas Gal
2005-05-03 19:18                       ` Junio C Hamano
2005-04-29 21:27         ` Daniel Barkalow
2005-04-29 22:01           ` Junio C Hamano
2005-04-30  5:36             ` [PATCH] Split out "pull" from particular methods Daniel Barkalow
2005-05-04  5:54       ` [PATCH] Add git-relink-script, a tool to hardlink two existing repositories Ryan Anderson
2005-05-02 21:13     ` More problems Petr Baudis

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=Pine.LNX.4.60.0504292254430.25700@hermes-1.csi.cam.ac.uk \
    --to=aia21@cam.ac.uk \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=pasky@ucw.cz \
    --cc=rmk@arm.linux.org.uk \
    --cc=ryan@michonline.com \
    --cc=torvalds@osdl.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).