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

Re: [PATCH 0/4] Pulling refs files

From
Petr Baudis <pasky@ucw.cz>
Date
May 18, 2005, 21:35 UTC
Message-ID
<20050518213529.GE10358@pasky.ji.cz>
In-Reply-To
<Pine.LNX.4.21.0505171802570.30848-100000@iabervon.org>

Dear diary, on Wed, May 18, 2005 at 12:20:40AM CEST, I got a letter where Daniel Barkalow <barkalow@iabervon.org> told me that...

Show 20 quoted lines
> On Tue, 17 May 2005, Petr Baudis wrote:
> 
> > Dear diary, on Tue, May 17, 2005 at 11:20:54PM CEST, I got a letter
> > where Daniel Barkalow <barkalow@iabervon.org> told me that...
> > > Hmm... maybe the right thing is to make the implementation-provided
> > > transfer code handle arbitrary things in GIT_DIR, but have code for
> > > updating reference files atomically and using a reference file to start
> > > from use "refs/"? Certainly, there's nothing special about reference files
> > > in transit.
> > > 
> > > Certainly the things in the info/ directory shouldn't be treated a head
> > > that you're going to pull, so that has to be different above the protocol
> > > level anyway.
> > 
> > *confused* :) I'm sorry, I have trouble understanding this. Could you
> > rephrase, please?
> 
> If you want to get info/ignore, you want to get it and save it, not
> download a set of objects it refers to. So it's different from specifying
> that you want to use refs/heads/master as the starting point for a pull.

Obviously. I think you should need to "explicitly" tell pull to actually save any files locally, since you (I mean Cogito) certainly does not want the pull stuff to touch the local refs/heads/master - it wants it in some other file.

Show 13 quoted lines
> > > So the remote receiver should get an instruction: change X from OLD to NEW
> > > and pull NEW. It should:
> > > 
> > >  - lock the file against further updates
> > >  - check that the current value is the provided OLD
> > >  - pull the necessary objects
> > >  - write NEW to the file
> > - unlock the file ;-))
> 
> The way I'm actually doing things is to write NEW into the lock file at
> some arbitrary point, and "writing to the file" is actually renaming the
> lock file to the normal filename. So writing unlocks the file
> automatically.
Ah. Obviously. That makes sense. :-)
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 17 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.