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

[RFC] Order of push/pull file transfers

From
RKRussell King <rmk@arm.linux.org.uk>
Date
Jun 23, 2005, 10:12 UTC
Message-ID
<20050623111255.A1162@flint.arm.linux.org.uk>
Hi,

I'd like to start a discussion on the ordering of the various git files being transferred.

Last night, I pulled Linus' kernel tree from k.o, but Linus was in the middle of pushing an update to it. The way cogito works, it grabs the HEAD first, and then rsyncs the objects.

However, this retrieved the updated HEAD, and only some of the objects. cogito happily tried to merge the result, and failed. A later pull and git-fsck-cache confirmed everything was fine _in this instance_.

Therefore, may I suggest the following two changes in the way git works:

1. a push updates HEAD only after the rsync/upload of all objects is
   complete.  This means that any pull will not try to update to the
   new head with a partial object tree.
2. a pull only tries to fetch objects if HEAD has been updated since
   the last pull.

This gives a pull-er an additional safety margin which ensures that merges will not be attempted when a simultaneous pull and push occurs at the same time.

-- 
Russell King
Next: Daniel Barkalow
Message 1 of 2 in “[RFC] Order of push/pull file transfers”
  1. Russell KingJun 23, 2005
  2. Daniel BarkalowJun 24, 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.