Re: [PATCH 3/3] git checkout --nodwim
- From
Jeff King <peff@peff.net>
- Date
- Oct 26, 2009, 21:26 UTC
- Message-ID
- <20091026212628.GC27744@sigio.peff.net>
- In-Reply-To
- <32541b130910261340g1988caednc17f3d159ec00d26@mail.gmail.com>
On Mon, Oct 26, 2009 at 04:40:41PM -0400, Avery Pennarun wrote:
Show 6 quoted lines
> I don't think there's actually a plumbing alternative to git-checkout, > however. My git-subtree script (and another script at work) have > already had some bugs because of this (specifically, the differing > behaviour of git-checkout with and without a path specified). Is > there something else I should be using in my scripts to be maximally > safe?
It's git-update-ref. Which highlights one problem with the porcelain/plumbing distinction. Our plumbing building blocks work at a very low level, but often when scripting you want to use higher level building blocks. So porcelain gets used in scripts, and gets an ambiguous state. Consider "git commit", for example. Does anyone actually script around "write-tree" and "commit-tree" these days, or do they just script around "git commit"?
-Peff