{"thread":{"id":"38953","subject":"[PATCH] cherry-pick: fix docs describing handling of empty commits","startedAt":"2015-03-31T01:08:54Z","lastAt":"2015-03-31T01:21:02Z","messageCount":2,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"258713","messageId":"20150331010854.GA17811@peff.net","threadId":"38953","inReplyTo":null,"subject":"[PATCH] cherry-pick: fix docs describing handling of empty commits","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-03-31T01:08:54Z","receivedAt":"2015-03-31T01:08:54Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Commit b27cfb0 (git-cherry-pick: Add keep-redundant-commits\noption, 2012-04-20), added the --keep-redundant-commits\noption, and switched the default behavior (without that\noption) to silently ignore empty commits. Later, the second\nhalf of that commit was reverted in ac2b0e8 (cherry-pick:\nregression fix for empty commits, 2012-05-29), but the\ndocumentation added for --keep-redundant-commits was never\nupdated to match. Let's do so now.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/git-cherry-pick.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt\nindex 1c03c79..1147c71 100644\n--- a/Documentation/git-cherry-pick.txt\n+++ b/Documentation/git-cherry-pick.txt\n@@ -131,7 +131,8 @@ effect to your index in a row.\n --keep-redundant-commits::\n \tIf a commit being cherry picked duplicates a commit already in the\n \tcurrent history, it will become empty.  By default these\n-\tredundant commits are ignored.  This option overrides that behavior and\n+\tredundant commits cause `cherry-pick` to stop so the user can\n+\texamine the commit. This option overrides that behavior and\n \tcreates an empty commit object.  Implies `--allow-empty`.\n \n --strategy=<strategy>::\n-- \n2.4.0.rc0.363.gf9f328b\n"},{"id":"258714","messageId":"20150331012102.GA17961@peff.net","threadId":"38953","inReplyTo":"20150331010854.GA17811@peff.net","subject":"Re: [PATCH] cherry-pick: fix docs describing handling of empty commits","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-03-31T01:21:02Z","receivedAt":"2015-03-31T01:21:02Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Mar 30, 2015 at 09:08:54PM -0400, Jeff King wrote:\n\n> Commit b27cfb0 (git-cherry-pick: Add keep-redundant-commits\n> option, 2012-04-20), added the --keep-redundant-commits\n> option, and switched the default behavior (without that\n> option) to silently ignore empty commits. Later, the second\n> half of that commit was reverted in ac2b0e8 (cherry-pick:\n> regression fix for empty commits, 2012-05-29), but the\n> documentation added for --keep-redundant-commits was never\n> updated to match. Let's do so now.\n> \n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n>  Documentation/git-cherry-pick.txt | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt\n> index 1c03c79..1147c71 100644\n> --- a/Documentation/git-cherry-pick.txt\n> +++ b/Documentation/git-cherry-pick.txt\n> @@ -131,7 +131,8 @@ effect to your index in a row.\n>  --keep-redundant-commits::\n>  \tIf a commit being cherry picked duplicates a commit already in the\n>  \tcurrent history, it will become empty.  By default these\n> -\tredundant commits are ignored.  This option overrides that behavior and\n> +\tredundant commits cause `cherry-pick` to stop so the user can\n> +\texamine the commit. This option overrides that behavior and\n>  \tcreates an empty commit object.  Implies `--allow-empty`.\n\nAs an aside, I think what b27cfb0 was trying to do was make:\n\n  git cherry-pick foo~5\n  git cherry-pick foo~10..foo\n\nwork without stopping (by silently omitting foo~5 in the second\ncherry-pick). But it regressed:\n\n  git cherry-pick foo~5\n  git cherry-pick foo~5\n\nwhich should complain (there was nothing to pick). The fix for that in\nac2b0e8 restored the original behavior, and we always stop, even in the\nmiddle of a sequence.\n\nAt least that's my guess from reading the nearby thread[1]. I think I\nslightly prefer the \"auto-skip\" behavior, but I don't care enough to\nwork on it right now. It's been long enough since the original series\nthat I doubt new patches are forth-coming, so I decided on just doing\nthe documentation patch for now. :)\n\n-Peff\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/198319/focus=198926\n"}]}