git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git cherry-pick feature request

From
Paul Mackerras <paulus@samba.org>
Date
Aug 23, 2006, 06:29 UTC
Message-ID
<17643.62896.396783.890223@cargo.ozlabs.ibm.com>
Junio,

I have added a feature on the "new" branch of gitk which allows the user to cherry-pick commits on to the head of the current branch. Currently I am using 'sh -c "git cherry-pick -r $id 2>&1"' for this.

The reason for the "2>&1" is that git cherry-pick writes stuff to stderr even when there is no error, and the Tcl exec command assumes that if the command writes to stderr that it failed somehow.

Also, if the merge fails, git cherry-pick leaves the commit partially merged rather than restoring the original state.

Could I have a flag to git cherry-pick (-q for quiet, maybe) that tells it not to print anything if the command succeeds? Could I also have a flag that tells it to clean up if the merge fails and leave the tree in its previous state?

Or is there some other git command that already does all this that I should use instead?

Thanks, Paul.

Next: Junio C Hamano
Message 1 of 7 in “git cherry-pick feature request”
  1. Paul MackerrasAug 23, 2006
  2. Junio C HamanoAug 23, 2006
  3. Paul MackerrasAug 23, 2006
  4. Jeff KingAug 23, 2006
  5. Junio C HamanoAug 24, 2006
  6. Junio C HamanoAug 24, 2006
  7. Paul MackerrasAug 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.