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

Re: [RFC] updates for git-pull-script

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 24, 2005, 17:49 UTC
Message-ID
<Pine.LNX.4.58.0504241045260.15879@ppc970.osdl.org>
In-Reply-To
<1114352069.4997.24.camel@mulgrave>
On Sun, 24 Apr 2005, James Bottomley wrote:
> 
> The attached addresses all these points.  It's what I use, but since
> others may prefer the original behaviour, I'm sending it as a straw
> horse.

I don't think anybody preferes the original behaviour - the reason git-pull-script punted with any non-trivial merge was that when I wrote the damn thing, I was still just testing out the merges, and I definitely didn't trust the automated script.

However, when you remove the "checkout-cache -f -a" thing, it means that you are leaving all teh checked-out files in a state where it's _very_ easy to mess up later, and doign so silently really is very bad.

So at the _very_ least you should do an "update-cache --refresh", and _tell_ the user about the files that are checked-out but not up-to-date.

And it really sounds like the whole and only reason you don't like checkout-cache is that you normally work with an empty tree, so I actually think that the _right_ answer for you is to add a new flag to "checkout-cache" that only updates files that already exist. Something like "-n" for "don't create new files".

		Linus
Previous: James BottomleyNext: James Bottomley
Message 2 of 3 in “[RFC] updates for git-pull-script”
  1. James BottomleyApr 24, 2005
  2. Linus TorvaldsApr 24, 2005
  3. James BottomleyApr 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.