git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] cherry-pick: fix docs describing handling of empty commits
@ 2015-03-31  1:08 Jeff King
  2015-03-31  1:21 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff King @ 2015-03-31  1:08 UTC (permalink / raw)
  To: git

Commit b27cfb0 (git-cherry-pick: Add keep-redundant-commits
option, 2012-04-20), added the --keep-redundant-commits
option, and switched the default behavior (without that
option) to silently ignore empty commits. Later, the second
half of that commit was reverted in ac2b0e8 (cherry-pick:
regression fix for empty commits, 2012-05-29), but the
documentation added for --keep-redundant-commits was never
updated to match. Let's do so now.

Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/git-cherry-pick.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 1c03c79..1147c71 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -131,7 +131,8 @@ effect to your index in a row.
 --keep-redundant-commits::
 	If a commit being cherry picked duplicates a commit already in the
 	current history, it will become empty.  By default these
-	redundant commits are ignored.  This option overrides that behavior and
+	redundant commits cause `cherry-pick` to stop so the user can
+	examine the commit. This option overrides that behavior and
 	creates an empty commit object.  Implies `--allow-empty`.
 
 --strategy=<strategy>::
-- 
2.4.0.rc0.363.gf9f328b

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cherry-pick: fix docs describing handling of empty commits
  2015-03-31  1:08 [PATCH] cherry-pick: fix docs describing handling of empty commits Jeff King
@ 2015-03-31  1:21 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2015-03-31  1:21 UTC (permalink / raw)
  To: git; +Cc: Neil Horman

On Mon, Mar 30, 2015 at 09:08:54PM -0400, Jeff King wrote:

> Commit b27cfb0 (git-cherry-pick: Add keep-redundant-commits
> option, 2012-04-20), added the --keep-redundant-commits
> option, and switched the default behavior (without that
> option) to silently ignore empty commits. Later, the second
> half of that commit was reverted in ac2b0e8 (cherry-pick:
> regression fix for empty commits, 2012-05-29), but the
> documentation added for --keep-redundant-commits was never
> updated to match. Let's do so now.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  Documentation/git-cherry-pick.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
> index 1c03c79..1147c71 100644
> --- a/Documentation/git-cherry-pick.txt
> +++ b/Documentation/git-cherry-pick.txt
> @@ -131,7 +131,8 @@ effect to your index in a row.
>  --keep-redundant-commits::
>  	If a commit being cherry picked duplicates a commit already in the
>  	current history, it will become empty.  By default these
> -	redundant commits are ignored.  This option overrides that behavior and
> +	redundant commits cause `cherry-pick` to stop so the user can
> +	examine the commit. This option overrides that behavior and
>  	creates an empty commit object.  Implies `--allow-empty`.

As an aside, I think what b27cfb0 was trying to do was make:

  git cherry-pick foo~5
  git cherry-pick foo~10..foo

work without stopping (by silently omitting foo~5 in the second
cherry-pick). But it regressed:

  git cherry-pick foo~5
  git cherry-pick foo~5

which should complain (there was nothing to pick). The fix for that in
ac2b0e8 restored the original behavior, and we always stop, even in the
middle of a sequence.

At least that's my guess from reading the nearby thread[1]. I think I
slightly prefer the "auto-skip" behavior, but I don't care enough to
work on it right now. It's been long enough since the original series
that I doubt new patches are forth-coming, so I decided on just doing
the documentation patch for now. :)

-Peff

[1] http://thread.gmane.org/gmane.comp.version-control.git/198319/focus=198926

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-31  1:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31  1:08 [PATCH] cherry-pick: fix docs describing handling of empty commits Jeff King
2015-03-31  1:21 ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).