From: Junio C Hamano Date: Mon, 3 Sep 2012 22:53:37 +0000 (-0700) Subject: Merge branch 'cw/cherry-pick-allow-empty-message' X-Git-Tag: v1.8.0-rc0~113 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/831287d37c059d71a20c3c164bc743217114d94e?hp=-c Merge branch 'cw/cherry-pick-allow-empty-message' "git cherry-pick" by default stops when it sees a commit without any log message. The "--allow-empty-message" option can be used to silently proceed. * cw/cherry-pick-allow-empty-message: cherry-pick: add --allow-empty-message option --- 831287d37c059d71a20c3c164bc743217114d94e diff --combined Documentation/git-cherry-pick.txt index 0e170a51ca,ba1edb8251..c205d2363e --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@@ -47,9 -47,7 +47,9 @@@ OPTION linkgit:gitrevisions[7]. Sets of commits can be passed but no traversal is done by default, as if the '--no-walk' option was specified, see - linkgit:git-rev-list[1]. + linkgit:git-rev-list[1]. Note that specifying a range will + feed all ... arguments to a single revision walk + (see a later example that uses 'maint master..next'). -e:: --edit:: @@@ -118,6 -116,11 +118,11 @@@ effect to your index in a row previous commit are dropped. To force the inclusion of those commits use `--keep-redundant-commits`. + --allow-empty-message:: + By default, cherry-picking a commit with an empty message will fail. + This option overrides that behaviour, allowing commits with empty + messages to be cherry picked. + --keep-redundant-commits:: If a commit being cherry picked duplicates a commit already in the current history, it will become empty. By default these @@@ -151,15 -154,6 +156,15 @@@ EXAMPLE Apply the changes introduced by all commits that are ancestors of master but not of HEAD to produce new commits. +`git cherry-pick maint next ^master`:: +`git cherry-pick maint master..next`:: + + Apply the changes introduced by all commits that are + ancestors of maint or next, but not master or any of its + ancestors. Note that the latter does not mean `maint` and + everything between `master` and `next`; specifically, + `maint` will not be used if it is included in `master`. + `git cherry-pick master~4 master~2`:: Apply the changes introduced by the fifth and third last