Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-27 Thread Sergey Organov
Jeff King writes: > On Mon, Mar 25, 2019 at 09:43:09AM +0300, Sergey Organov wrote: > >> How about changing "git show -p M" to output "diff -p M^ M" rather than >> "diff-tree --cc M" for merge commits? It's really surprising specifying >> -p has no visible effect. > > That's because "-p" is alrea

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-26 Thread Elijah Newren
On Tue, Mar 26, 2019 at 3:20 PM Jeff King wrote: > > On Tue, Mar 26, 2019 at 03:07:42PM -0700, Elijah Newren wrote: > > > On Tue, Mar 26, 2019 at 9:35 AM Jeff King wrote: > > > > > > On Mon, Mar 25, 2019 at 09:43:09AM +0300, Sergey Organov wrote: > > > > > > > How about changing "git show -p M" t

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-26 Thread Jeff King
On Tue, Mar 26, 2019 at 03:07:42PM -0700, Elijah Newren wrote: > On Tue, Mar 26, 2019 at 9:35 AM Jeff King wrote: > > > > On Mon, Mar 25, 2019 at 09:43:09AM +0300, Sergey Organov wrote: > > > > > How about changing "git show -p M" to output "diff -p M^ M" rather than > > > "diff-tree --cc M" for

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-26 Thread Elijah Newren
On Tue, Mar 26, 2019 at 9:35 AM Jeff King wrote: > > On Mon, Mar 25, 2019 at 09:43:09AM +0300, Sergey Organov wrote: > > > How about changing "git show -p M" to output "diff -p M^ M" rather than > > "diff-tree --cc M" for merge commits? It's really surprising specifying > > -p has no visible effec

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-26 Thread Jeff King
On Mon, Mar 25, 2019 at 09:43:09AM +0300, Sergey Organov wrote: > How about changing "git show -p M" to output "diff -p M^ M" rather than > "diff-tree --cc M" for merge commits? It's really surprising specifying > -p has no visible effect. That's because "-p" is already the default, and the forma

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-24 Thread Sergey Organov
Junio C Hamano writes: > Sergey Organov writes: > >> I think that "first-parent is special" is the way to go indeed for >> porcelain, as it does make many thing easier and more convenient[*]. > > Perhaps. However ... > >> [*] One example that immediately comes to mind is "git log -p" for a >> m

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-19 Thread Jeff King
On Wed, Mar 20, 2019 at 09:38:57AM +0900, Junio C Hamano wrote: > "git log -p --first-parent" that requires "-m" to show the single > ball of wax diff for a merge is a separate matter. When the user > explicitly says "log --first-parent", it is a clear indication that > the user does not want to

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-19 Thread Junio C Hamano
Sergey Organov writes: > I think that "first-parent is special" is the way to go indeed for > porcelain, as it does make many thing easier and more convenient[*]. Perhaps. However ... > [*] One example that immediately comes to mind is "git log -p" for a > merge commit. I doesn't currently (as

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2019-03-19 Thread Sergey Organov
Hi Junio, [It's been a while since this discussion, and recently I've got some thoughts and questions about "first-parent" issues in general, below.] Junio C Hamano writes: > Sergey Organov writes: > >> When cherry-picking multiple commits, it's impossible to have both >> merge- and non-merge

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-12-13 Thread Junio C Hamano
Sergey Organov writes: > I came up with the following as a preparatory change. Looks acceptable? > > -- 8< -- > > t3510: stop using '-m 1' to force failure mid-sequence of cherry-picks > > We are going to allow 'git cherry-pick -m 1' for non-merge commits, so > this method to for

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-12-13 Thread Sergey Organov
Sergey Organov writes: > Junio C Hamano writes: > >> Sergey Organov writes: >> [...] >> >> The change to the code itself looks sane, but applying this patch >> alone will break existing tests whose expectations must be updated, >> and this new behaviour must be protected by a new test (or two

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-12-12 Thread Sergey Organov
Junio C Hamano writes: > Sergey Organov writes: > >> When cherry-picking multiple commits, it's impossible to have both >> merge- and non-merge commits on the same command-line. Not specifying >> '-m 1' results in cherry-pick refusing to handle merge commits, while >> specifying '-m 1' fails on

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-12-12 Thread Junio C Hamano
Sergey Organov writes: > When cherry-picking multiple commits, it's impossible to have both > merge- and non-merge commits on the same command-line. Not specifying > '-m 1' results in cherry-pick refusing to handle merge commits, while > specifying '-m 1' fails on non-merge commits. > > This patc

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-12-11 Thread Sergey Organov
Junio C Hamano writes: > Sergey Organov writes: > >> When cherry-picking multiple commits, it's impossible to have both >> merge- and non-merge commits on the same command-line. Not specifying >> '-m 1' results in cherry-pick refusing to handle merge commits, while >> specifying '-m 1' fails on n

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-06-22 Thread Sergey Organov
Junio C Hamano writes: > Sergey Organov writes: > >> When cherry-picking multiple commits, it's impossible to have both >> merge- and non-merge commits on the same command-line. Not specifying >> '-m 1' results in cherry-pick refusing to handle merge commits, while >> specifying '-m 1' fails on

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-06-21 Thread Junio C Hamano
Sergey Organov writes: > When cherry-picking multiple commits, it's impossible to have both > merge- and non-merge commits on the same command-line. Not specifying > '-m 1' results in cherry-pick refusing to handle merge commits, while > specifying '-m 1' fails on non-merge commits. Allowing "-m

[PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-06-21 Thread Sergey Organov
When cherry-picking multiple commits, it's impossible to have both merge- and non-merge commits on the same command-line. Not specifying '-m 1' results in cherry-pick refusing to handle merge commits, while specifying '-m 1' fails on non-merge commits. This patch allows '-m 1' for non-merge commit

[PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-05-25 Thread Sergey Organov
When cherry-picking multiple commits, it's impossible to have both merge- and non-merge commits on the same command-line. Not specifying '-m 1' results in cherry-pick refusing to handle merge commits, while specifying '-m 1' fails on non-merge commits. This patch allows '-m 1' for non-merge commit