Subject: Re: New directory lost by git am

From: Phillip Susi <[email-masked]>
Date: Wed, 05 Mar 2014 13:29:27 -0500

On 3/5/2014 12:13 PM, Jeff King wrote:
> We apply the changes to "modified" and "new" to the working tree,
> but we do not stage anything in the index. I suspect this is
> because our invocation of "apply --index" (which is what is doing
> the real work with "--reject" here) bails before touching the
> index. In theory it should be able to update the index for files
> that applied cleanly and leave the other ones alone.

Yikes, that's really bad.

> But I have not thought hard about it, so maybe there is a good
> reason not to (it is a little weird just because the resulting
> index is a partial application of the patch).  The "am -3" path
> does what you want here, but it is much simpler: it knows it can
> represent the 3-way conflict in the index. So the index represents
> the complete state of the patch application at the end, including
> conflicts.

yes, but -3 fails if it can't find the parent blobs.