From d51a47552a913dcd4ba436d529d092e4f38a3182 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 14 Jan 2014 10:26:21 -0800 Subject: Documentation: exclude irrelevant options from "git pull" 10eb64f5 (git pull manpage: don't include -n from fetch-options.txt, 2008-01-25) introduced a way to exclude some parts of included source when building git-pull documentation, and later 409b8d82 (Documentation/git-pull: put verbosity options before merge/fetch ones, 2010-02-24) attempted to use the mechanism to exclude some parts of merge-options.txt when used from git-pull.txt. However, the latter did not have an intended effect, because the macro "git-pull" used to decide if the source is included in git-pull documentation were defined a bit too late. Define the macro before it is used to fix this. Signed-off-by: Junio C Hamano --- Documentation/git-pull.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index d47f9ddd89..0e7a1fe8ae 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -42,10 +42,10 @@ OPTIONS Options related to merging ~~~~~~~~~~~~~~~~~~~~~~~~~~ -include::merge-options.txt[] - :git-pull: 1 +include::merge-options.txt[] + --rebase:: Instead of a merge, perform a rebase after fetching. If there is a remote ref for the upstream branch, and this branch -- cgit v1.2.3 From 08f19cfe9bff097e8828a289d2daf5f066e1af9d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 14 Jan 2014 10:26:21 -0800 Subject: Documentation: "git pull" does not have the "-m" option Even though "--[no-]edit" can be used with "git pull", the explanation of the interaction between this option and the "-m" option does not make sense within the context of "git pull". Use the conditional inclusion mechanism to remove this part from "git pull" documentation, while keeping it for "git merge". Reported-by: Ivan Zakharyaschev Signed-off-by: Junio C Hamano --- Documentation/merge-options.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt index f192cd2e16..d462bcc4c3 100644 --- a/Documentation/merge-options.txt +++ b/Documentation/merge-options.txt @@ -14,9 +14,12 @@ inspect and further tweak the merge result before committing. further edit the auto-generated merge message, so that the user can explain and justify the merge. The `--no-edit` option can be used to accept the auto-generated message (this is generally - discouraged). The `--edit` (or `-e`) option is still useful if you are - giving a draft message with the `-m` option from the command line - and want to edit it in the editor. + discouraged). +ifndef::git-pull[] +The `--edit` (or `-e`) option is still useful if you are +giving a draft message with the `-m` option from the command line +and want to edit it in the editor. +endif::git-pull[] + Older scripts may depend on the historical behaviour of not allowing the user to edit the merge log message. They will see an editor opened when -- cgit v1.2.3