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 wrote: > Martin von Zweigbergk writes: >> On Sat, Dec 22, 2012 at 7:24 PM, Junio C Hamano wrote: > > I am not opposed to an "internal use" of the cherry-pick machinery to > implement a corner case of "rebase -i": > > 3. You run "rebase -i

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

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

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

2012-12-23 Thread Junio C Hamano
Junio C Hamano 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 the step

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

2012-12-23 Thread Junio C Hamano
Christian Couder 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 "unsubscribe git" in the body of a

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

2012-12-23 Thread Junio C Hamano
Martin von Zweigbergk writes: > On Sat, Dec 22, 2012 at 7:24 PM, Junio C Hamano wrote: >> Martin von Zweigbergk 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 a

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 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 might be to re

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 wrote: > Martin von Zweigbergk 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 h

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

2012-12-22 Thread Junio C Hamano
Martin von Zweigbergk 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)) > - return fa

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

2012-12-22 Thread Junio C Hamano
Martin von Zweigbergk 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 an unborn branch,

[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 resul