Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

git cherry-pick feature request

From: Paul Mackerras <hidden>
Date: 2016-06-15 22:42:37

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help