Re: [PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Johannes Schindelin
Hi Paul, On 2015-08-17 11:48, Paul Tan wrote: It's true that we need to merge the ORIG_HEAD tree into the index instead of overwriting it. Patch below. Thanks for your impressive, very responsive work! Dscho -- To unsubscribe from this list: send the line unsubscribe git in the body of a

[PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Paul Tan
for the test, and sorry all for the oversight. It's true that we need to merge the ORIG_HEAD tree into the index instead of overwriting it. Patch below. Regards, Paul -- 8 -- Subject: [PATCH] am --abort: merge ORIG_HEAD tree into index After running git am --abort, and then running git reset --hard

Re: [PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Linus Torvalds
On Mon, Aug 17, 2015 at 2:48 AM, Paul Tan pyoka...@gmail.com wrote: It's true that we need to merge the ORIG_HEAD tree into the index instead of overwriting it. Patch below. Seems to work for me. Thanks, Linus -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] am --abort: merge ORIG_HEAD tree into index

2015-08-17 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: The codepath in the original looks like this: head_tree=$(git rev-parse --verify -q HEAD || echo $empty_tree) == git read-tree --reset -u $head_tree $head_tree index_tree=$(git write-tree) orig_head=$(git rev-parse --verify -q