git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [darcs-devel] Re: A darcs that can pull from git

From
David Roundy <droundy@abridgegame.org>
Date
Apr 26, 2005, 12:47 UTC
Message-ID
<20050426124704.GB28120@abridgegame.org>
In-Reply-To
<20050426123445.GE18971@pasky.ji.cz>
On Tue, Apr 26, 2005 at 02:34:45PM +0200, Petr Baudis wrote:
Show 15 quoted lines
> Dear diary, on Tue, Apr 26, 2005 at 01:06:17PM CEST, I got a letter
> where David Roundy <droundy@abridgegame.org> told me that...
> > Do the git have any suggestions about how to avoid excess downloads or
> > excess copies of a git repository? It seems to me like it would make sense
> > to always download sha1s to ~/.gitcache/, and then hardlink them to the
> > current git repository, so you wouldn't end up ever downloading the same
> > sha1 twice.  Or we should use $GITCACHE/, to give the user some
> > flexibility.  But perhaps this is an already-solved problem, and I've just
> > not noticed...
> 
> I'm not sure about the problem you are actually trying to solve, and I
> didn't manage to guess it quickly just from the mails themselves;
> cg-init /local/path now hardlinks the sha1 objects to the local
> .git/objects directory, so you get no space waste. If you are talking
> about downloading stuff from remote repositories, http-pull might help.

Yeah, what I was wondering about was the scenario where a user does (and pardon any errors, I haven't actually used cogito) something like

cd foo cg-init http://remote_repository cd ../bar cg-init ../foo

(so far we've only got hard links and everything is great)

http-pull http://remote_repository (downloads a few more commits to bar) cd ../foo http-pull http://remote_repository

Does this last pull download the same commits as the previous one? Ideally it wouldn't. The whole point of the sha1-named files is that you don't have to worry about where you got it from. Ideally the second pull would get the actual files from ../bar, where they've already been downloaded.

Or perhaps (and this was what I was *really* hoping) all the cogito remote operations would store a hardlink of their results in a common cache directory, so that one could actually do

cd foo cg-init http://remote_repository cd ../bar cg-init http://remote_repository

without either downloading anything twice, or wasting any disk space. In practice what's more likely in practice is that you'll want to

cd foo cg-init http://linus_remote_repository cd ../bar cg-init http://gregkh_remote_repository

and would like to avoid downloading redundant info.
-- 
David Roundy
http://www.darcs.net
Previous: Petr Baudis
Message 7 of 7 in “A darcs that can pull from git”
  1. Juliusz ChroboczekApr 24, 2005
  2. David RoundyApr 25, 2005
  3. Juliusz ChroboczekApr 25, 2005
  4. Linus TorvaldsApr 26, 2005
  5. David RoundyApr 26, 2005
  6. Petr BaudisApr 26, 2005
  7. David RoundyApr 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.