{"thread":{"id":"8900","subject":"[PATCH] Deprecate git-cherry","startedAt":"2007-07-06T16:29:57Z","lastAt":"2007-07-06T21:21:42Z","messageCount":3,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"46646","messageId":"Pine.LNX.4.64.0707061722020.4093@racer.site","threadId":"8900","inReplyTo":null,"subject":"[PATCH] Deprecate git-cherry","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-06T16:29:57Z","receivedAt":"2007-07-06T16:29:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nA cleaner alternative was introduced in v1.5.2~185^2~1, which not only\nallows you to list the commits, but to inspect them, too:\n\n\tgit log --cherry-pick <upstream>...[<head>]\n\nThere is a functional difference, though: git cherry shows both \ndirections, <upstream>...<head> and <head>...<upstream>, and prefixes\nthe commits with '+' and '-', respectively.\n\n'git rev-list --cherry-pick <upstream>...[<head>]' only shows one \ndirection, and does not prefix the commits.\n\nHowever, in practice you are usually only interested in one direction \nanyway (as seen in the cvsexportcommit example).\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n\tIt might make sense to also allow \"--cherry\", since it is shorter \n\tto type ;-)\n\n Documentation/core-tutorial.txt       |    4 ++--\n Documentation/git-cherry.txt          |    6 ++++++\n Documentation/git-cvsexportcommit.txt |    2 +-\n t/t3401-rebase-partial.sh             |    2 +-\n 4 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt\nindex 4fb6f41..accd0dc 100644\n--- a/Documentation/core-tutorial.txt\n+++ b/Documentation/core-tutorial.txt\n@@ -1571,8 +1571,8 @@ like this:\n    half of `git pull` but does not merge. The head of the\n    public repository is stored in `.git/refs/remotes/origin/master`.\n \n-4. Use `git cherry origin` to see which ones of your patches\n-   were accepted, and/or use `git rebase origin` to port your\n+4. Use `git log --cherry-pick origin...` to see which ones of your\n+   patches were accepted, and/or use `git rebase origin` to port your\n    unmerged changes forward to the updated upstream.\n \n 5. Use `git format-patch origin` to prepare patches for e-mail\ndiff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt\nindex e694382..16e170f 100644\n--- a/Documentation/git-cherry.txt\n+++ b/Documentation/git-cherry.txt\n@@ -11,6 +11,12 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n+THIS COMMAND IS DEPRECATED:\n+Use 'git rev-list --cherry-pick upstream...head' instead.  This will\n+display the commits that would have been prefixed with '+' by\n+'git cherry upstream..head'.  If you need the commits prefixed with '-',\n+use 'git rev-list --cherry-pick head...upstream' instead.\n+\n The changeset (or \"diff\") of each commit between the fork-point and <head>\n is compared against each commit between the fork-point and <upstream>.\n \ndiff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt\nindex 6c423e3..3055764 100644\n--- a/Documentation/git-cvsexportcommit.txt\n+++ b/Documentation/git-cvsexportcommit.txt\n@@ -81,7 +81,7 @@ Merge pending patches into CVS automatically -- only if you really know what you\n ------------\n $ export GIT_DIR=~/project/.git\n $ cd ~/project_cvs_checkout\n-$ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git-cvsexportcommit -c -p -v\n+$ git rev-list --cherry-pick cvshead...myhead  | xargs -l1 git-cvsexportcommit -c -p -v\n ------------\n \n Author\ndiff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh\nindex 4934a4e..6902737 100755\n--- a/t/t3401-rebase-partial.sh\n+++ b/t/t3401-rebase-partial.sh\n@@ -43,7 +43,7 @@ test_expect_success \\\n '\n \n test_debug \\\n-    'git cherry master &&\n+    'git log --cherry-pick master... &&\n      git format-patch -k --stdout --full-index master >/dev/null &&\n      gitk --all & sleep 1\n '\n"},{"id":"46659","messageId":"7vmyy9dzrr.fsf@assigned-by-dhcp.cox.net","threadId":"8900","inReplyTo":"Pine.LNX.4.64.0707061722020.4093@racer.site","subject":"Re: [PATCH] Deprecate git-cherry","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-06T20:48:40Z","receivedAt":"2007-07-06T20:48:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> A cleaner alternative was introduced in v1.5.2~185^2~1, which not only\n> allows you to list the commits, but to inspect them, too:\n>\n> \tgit log --cherry-pick <upstream>...[<head>]\n>\n> There is a functional difference, though: git cherry shows both \n> directions, <upstream>...<head> and <head>...<upstream>, and prefixes\n> the commits with '+' and '-', respectively.\n>\n> 'git rev-list --cherry-pick <upstream>...[<head>]' only shows one \n> direction, and does not prefix the commits.\n\nEh, --left-right anybody?\n\ngit-cherry is used by people's scripts, and I do not think\ndeprecating is an option at least in the short term.\n"},{"id":"46661","messageId":"Pine.LNX.4.64.0707062212280.4093@racer.site","threadId":"8900","inReplyTo":"7vmyy9dzrr.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Deprecate git-cherry","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-06T21:21:42Z","receivedAt":"2007-07-06T21:21:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 6 Jul 2007, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > A cleaner alternative was introduced in v1.5.2~185^2~1, which not only\n> > allows you to list the commits, but to inspect them, too:\n> >\n> > \tgit log --cherry-pick <upstream>...[<head>]\n> >\n> > There is a functional difference, though: git cherry shows both \n> > directions, <upstream>...<head> and <head>...<upstream>, and prefixes\n> > the commits with '+' and '-', respectively.\n> >\n> > 'git rev-list --cherry-pick <upstream>...[<head>]' only shows one \n> > direction, and does not prefix the commits.\n> \n> Eh, --left-right anybody?\n> \n> git-cherry is used by people's scripts, and I do not think\n> deprecating is an option at least in the short term.\n\nOkay, I should have been more precise.\n\nMaybe there are some interesting scripts that use \"git cherry\". I'd like \nto see them (which does not mean that I vote for git-cherry removal). \nPersonally, I use \"git rev-list --cherry-pick\", because it spares me one \ncall to sed.\n\nHowever, I do not think that there is much value in advertising it any \nmore. There is much more value in \"git log --cherry-pick\", since you can \nget the commit messages and the patches by just adding one more flag (and \nabsent any path parameter, that can be even _at the end_ of the command \nline, making it even more convenient).\n\nSo what I meat was: advertise \"git log --cherry-pick\" instead of \"git \ncherry\", since it is vastly more useful.\n\nThere is one real consequence on my common usage, though: It annoys me \nwhenever I want to cherry pick a commit, which happens quite often, that \nthe bash completion completes on this (for me) useless command. I would \nlike to see that gone (but only after a grace period, evidently).\n\nCiao,\nDscho\n"}]}