summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-11 19:45:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-11 19:45:34 (GMT)
commita0ceb72f38bf841322fc8ce28ea39328e8a5aa19 (patch)
tree5e7999a27838506611516356e4a8738482bb4545 /Documentation
parentcf04a660bb471dae76772f63f071768afb6d347c (diff)
parentb98878edefd284927748aa2ce9ff090fa43c2c8a (diff)
downloadgit-a0ceb72f38bf841322fc8ce28ea39328e8a5aa19.zip
git-a0ceb72f38bf841322fc8ce28ea39328e8a5aa19.tar.gz
git-a0ceb72f38bf841322fc8ce28ea39328e8a5aa19.tar.bz2
Merge branch 'cn/cherry-pick-range-docs' into maint
The documentation for "git cherry-pick A B..C" was misleading. * cn/cherry-pick-range-docs: git-cherry-pick.txt: clarify the use of revision range notation Documentation: --no-walk is no-op if range is specified
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-cherry-pick.txt13
-rw-r--r--Documentation/rev-list-options.txt1
2 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 9f3dae6..0e170a5 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -47,7 +47,9 @@ OPTIONS
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 <commit>... arguments to a single revision walk
+ (see a later example that uses 'maint master..next').
-e::
--edit::
@@ -149,6 +151,15 @@ EXAMPLES
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
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 1ae3c89..84e34b1 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -622,6 +622,7 @@ These options are mostly targeted for packing of git repositories.
--no-walk::
Only show the given revs, but do not traverse their ancestors.
+ This has no effect if a range is specified.
--do-walk::