Thread (9 messages) 9 messages, 5 authors, 2016-06-15

Re: [PATCH 3/3] git checkout --nodwim

From: Avery Pennarun <hidden>
Date: 2016-06-15 22:47:36

On Mon, Oct 26, 2009 at 5:26 PM, Jeff King [off-list ref] wrote:
On Mon, Oct 26, 2009 at 04:40:41PM -0400, Avery Pennarun wrote:
quoted
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.
That would be similar to git commit, not git checkout, right?  Oh
wait, I see the confusion: git checkout does two things.  It switches
branches, and it checks out files from the index into the work tree.
I meant the latter meaning.
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"?
Oh, I use those all the time.  They're awesome!  It allows you to
create commits without having a working tree, which lets me do very
interesting tricks.  git-subtree uses this heavily.

I'm probably a weirdo, though.

Have fun,

Avery
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help