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

Re: [PATCH 0/4] Pulling refs files

From
Daniel Barkalow <barkalow@iabervon.org>
Date
May 19, 2005, 16:00 UTC
Message-ID
<Pine.LNX.4.21.0505191147480.30848-100000@iabervon.org>
In-Reply-To
<20050519065207.GB18281@pasky.ji.cz>
On Thu, 19 May 2005, Petr Baudis wrote:
Show 15 quoted lines
> Dear diary, on Thu, May 19, 2005 at 05:19:01AM CEST, I got a letter
> where Daniel Barkalow <barkalow@iabervon.org> told me that...
> >  2) fetching reference files by name, and making them available to the
> >     local program without writing them to disk at all.
> >  3) fetching other files by name and writing them to either the
> >     corresponding filename or a provided replacement.
> > 
> > I had thought that (2) could be done as a special case of (3), but I think
> > that it has to be separate, because (2) just returns the value, while
> > (3) can't just return the contents, but has to write it somewhere, since
> > it isn't constrained to be exactly 20 bytes.
> 
> Huh. How would (2) be useful and why can't you just still write it e.g.
> to some user-supplied temporary file? I think that'd be still actually
> much less trouble for the scripts to handle.

(2) is what is needed if the user just requests downloading objects starting with a reference stored remotely, and doesn't request that the reference be written anywhere. It is also useful because the system wants to verify that it has actually downloaded the objects successfully before writing the reference.

Note that the scripts see a higher-level interface; these are the operations that (e.g.) http-pull.c has to provide for pull.c, which builds a larger operation (determine the target hash, download the objects, write the specified ref file) out of them. It would be inconvenient for pull.c to download to a temporary file and then read the temporary file, which shouldn't normally be visible yet, to figure out what it's doing. It wants to have a function that takes a string and returns a hash, getting the value from the remote host, and it's inconvenient to deal with the disk in the middle.

	-Daniel
*This .sig left intentionally blank*
Previous: Petr BaudisNext: Junio C Hamano
Message 20 of 23 in “Pulling refs files”
  1. 0/4 Pulling refs filesDaniel Barkalow, May 13, 2005
  2. 1/4 Support for refs directoryDaniel Barkalow, May 13, 2005
  3. 2/4 Generic support for pulling refsDaniel Barkalow, May 13, 2005
  4. 3/4 Pull refs by HTTPDaniel Barkalow, May 13, 2005
  5. Edgar ToernigMay 13, 2005
  6. 4/4 Pulling refs by sshDaniel Barkalow, May 13, 2005
  7. H. Peter AnvinMay 13, 2005
  8. Daniel BarkalowMay 15, 2005
  9. Petr BaudisMay 13, 2005
  10. Daniel BarkalowMay 13, 2005
  11. Petr BaudisMay 13, 2005
  12. Daniel BarkalowMay 15, 2005
  13. Petr BaudisMay 17, 2005
  14. Daniel BarkalowMay 17, 2005
  15. Petr BaudisMay 17, 2005
  16. Daniel BarkalowMay 17, 2005
  17. Petr BaudisMay 18, 2005
  18. Daniel BarkalowMay 19, 2005
  19. Petr BaudisMay 19, 2005
  20. Daniel BarkalowMay 19, 2005
  21. Junio C HamanoMay 15, 2005
  22. Daniel BarkalowMay 15, 2005
  23. Junio C HamanoMay 16, 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.