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