Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Git Mailing List <git@vger.kernel.org>
Subject: git-fetch-pack
Date: Mon, 4 Jul 2005 17:08:45 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0507041702590.3570@g5.osdl.org> (raw)


Ok,
 I've written a "git-fetch-pack" along the lines I outlined a few days 
ago, ie the person doing the fetching ends up listing the commits it has, 
and then both ends negotiate the missing objects.

It's probably buggy in many ways, but I actually used it to fetch the last 
merge with Russell King:

	remote=$(git-fetch-pack $repo master)
	if [ "$remote" ]; then
		git resolve $(git-rev-parse HEAD) $remote "Merge $repo"
	fi

ends up doing something sane.

In general, the format is to tell git-fetch-pack where to fetch things
from, and what branch to use (if you give none, or you give multiple, it
does various magic things, you shouldn't do it). It will then fetch and 
unpack the pack, and return the SHA1 corresponding to the remote ref if 
everything was successful.

So the above will fetch a remote ref, and resolve it (ie it's basically a 
specialized "git pull").

		Linus

                 reply	other threads:[~2005-07-05  0:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.58.0507041702590.3570@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.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