git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: Please undo "Use git-merge instead of git-resolve in
Date: Fri, 23 Sep 2005 23:19:01 -0700	[thread overview]
Message-ID: <7virwr2dka.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20050923095742.GC10255@pasky.or.cz> (Petr Baudis's message of "Fri, 23 Sep 2005 11:57:42 +0200")

Petr Baudis <pasky@suse.cz> writes:

> Dear diary, on Fri, Sep 23, 2005 at 11:34:16AM CEST, I got a letter
> where Junio C Hamano <junkio@cox.net> told me that...
>> Petr Baudis <pasky@suse.cz> writes:
>> 
>> > 	* cg-fetch can do with symlinked object database
>> 
>> Do you mean ".git/object" in the repository you are fetching
>> into is a symlink to somewhere, or something else?
>
> Yes, exactly that. You get it by doing cg-clone -l
> /local/path.

git-clone -l -s does optimization similar to that in spirit, but
it does not create a repository with symlinked .git/object
pointing at /some/where/original/repo/.git/object.  Instead it
uses alternates to borrow from the other; newly created objects
are always stored locally.

But I thought you were talking about fetch.  git-fetch should be
able to pull into a repository whose .git/object happens to be a
symlink pointing at somewhere else just fine.

> Just that if the reference pointer did not change, you don't try to pull
> any objects.

Both git-aware protocol and commit walker peek at the remote ref
and stop without downloading objects if it is known to us, so I
think we are OK.

>>     $ git-init-db && git fetch http://kernel.org/pub/scm/git/git.git
>> 
>> should work.
>
> Good.

Of course, the above 'git fetch' only fetches remote HEAD and
stores it in .git/FETCH_HEAD; if you truly want to 'clone', you
could first run git-ls-remote to peek the remote refs and then
give them as storing refspecs to git fetch, doing something like
this (modulo renaming 'master' over there to 'origin' here):

	mkdir foo && cd foo && git-init-db
	refspec=$(git-ls-remote $repo | \
	        sed -n -e 's/^[0-9a-f]*	//' -e 's|refs/.*|&:&|p')
	git fetch $repo $refspec

  parent reply	other threads:[~2005-09-24  6:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22 18:32 Please undo "Use git-merge instead of git-resolve in Jon Loeliger
2005-09-22 19:10 ` Petr Baudis
     [not found]   ` <34462.10.10.10.28.1127417134.squirrel@linux1>
2005-09-22 19:25     ` Sean
2005-09-22 22:22       ` Junio C Hamano
     [not found]         ` <55917.10.10.10.28.1127429674.squirrel@linux1>
2005-09-22 22:54           ` Sean
2005-09-23  9:10     ` Petr Baudis
2005-09-23  9:34       ` Junio C Hamano
2005-09-23  9:57         ` Petr Baudis
2005-09-23 21:07           ` Daniel Barkalow
2005-09-24  6:19           ` Junio C Hamano [this message]
2005-09-22 21:12 ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2005-09-23 13:51 Jon Loeliger
2005-09-22 19:12 Jon Loeliger
2005-09-22 21:22 ` Linus Torvalds
2005-09-22 21:37   ` Linus Torvalds
2005-09-22 21:57     ` Daniel Barkalow
2005-09-22 22:05       ` Linus Torvalds
2005-09-22 14:55 Jon Loeliger
2005-09-22 16:01 ` Petr Baudis
2005-09-22 16:06 ` Linus Torvalds

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=7virwr2dka.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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).