Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-23 Thread Junio C Hamano
Martin von Zweigbergk martinv...@gmail.com writes: On Sat, Dec 22, 2012 at 7:24 PM, Junio C Hamano gits...@pobox.com wrote: Martin von Zweigbergk martinv...@gmail.com writes: From the user's point of view, it seems natural to think that cherry-picking into an unborn branch should work, so

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-23 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: I agree that it would be nice if it worked. That is not saying anything. Yes, it would be nice if everything worked. But the question in the thread is with what definition of 'work'? -- To unsubscribe from this list: send the line

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-23 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Yes, and I do not think it is an implementation detail. I am not opposed to an internal use of the cherry-pick machinery to implement a corner case of rebase -i: ... In step 4., you would be internally using the cherry-pick machinery to implement

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-23 Thread Philip Oakley
From: Junio C Hamano gits...@pobox.com Sent: Sunday, December 23, 2012 3:24 AM Subject: Re: [PATCH 2/2] learn to pick/revert into unborn branch Martin von Zweigbergk martinv...@gmail.com writes: From the user's point of view, it seems natural to think that cherry-picking into an unborn branch

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-23 Thread Martin von Zweigbergk
On Sun, Dec 23, 2012 at 11:18 AM, Junio C Hamano gits...@pobox.com wrote: Martin von Zweigbergk martinv...@gmail.com writes: On Sat, Dec 22, 2012 at 7:24 PM, Junio C Hamano gits...@pobox.com wrote: I am not opposed to an internal use of the cherry-pick machinery to implement a corner case of

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-22 Thread Junio C Hamano
Martin von Zweigbergk martinv...@gmail.com writes: From the user's point of view, it seems natural to think that cherry-picking into an unborn branch should work, so make it work, with or without --ff. I actually am having a hard time imagining how that could ever be natural. When you are on

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-22 Thread Junio C Hamano
Martin von Zweigbergk martinv...@gmail.com writes: @@ -435,8 +437,9 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts) else parent = commit-parents-item; - if (opts-allow_ff parent !hashcmp(parent-object.sha1, head)) -

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-22 Thread Martin von Zweigbergk
On Sat, Dec 22, 2012 at 7:24 PM, Junio C Hamano gits...@pobox.com wrote: Martin von Zweigbergk martinv...@gmail.com writes: From the user's point of view, it seems natural to think that cherry-picking into an unborn branch should work, so make it work, with or without --ff. I actually am

Re: [PATCH 2/2] learn to pick/revert into unborn branch

2012-12-22 Thread Christian Couder
On Sun, Dec 23, 2012 at 7:24 AM, Martin von Zweigbergk martinv...@gmail.com wrote: As for use cases, I didn't consider that much more than that it might be useful for implementing git rebase --root. I haven't implemented that yet, so I can't say for sure that it will work out. One use case

[PATCH 2/2] learn to pick/revert into unborn branch

2012-12-21 Thread Martin von Zweigbergk
From the user's point of view, it seems natural to think that cherry-picking into an unborn branch should work, so make it work, with or without --ff. Cherry-picking anything other than a commit that only adds files, will naturally result in conflicts. Similarly, revert also works, but will