* BUG: manpage for git-pull mentions a non-valid option -m in a comment @ 2014-01-14 2:09 Ivan Zakharyaschev 2014-01-14 18:26 ` Re* " Junio C Hamano 0 siblings, 1 reply; 6+ messages in thread From: Ivan Zakharyaschev @ 2014-01-14 2:09 UTC (permalink / raw) To: git Hello! git-1.8.4.4 The manpage for git-pull mentions -m in a comment: --edit, -e, --no-edit Invoke an editor before committing successful mechanical merge to 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. but it is not accepted actually: git pull --no-edit -m 'Restoring config etc from server' \ origin server/GITCONFIG/master fatal: No such remote or remote group: Restoring config etc from server I'm not sure whether it is a bug of the implementation or of the documentation. (I've also written down this issue at https://bugzilla.altlinux.org/show_bug.cgi?id=29718 .) Best regards, Ivan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re* manpage for git-pull mentions a non-valid option -m in a comment 2014-01-14 2:09 BUG: manpage for git-pull mentions a non-valid option -m in a comment Ivan Zakharyaschev @ 2014-01-14 18:26 ` Junio C Hamano 2014-01-14 18:51 ` Torsten Bögershausen 0 siblings, 1 reply; 6+ messages in thread From: Junio C Hamano @ 2014-01-14 18:26 UTC (permalink / raw) To: Ivan Zakharyaschev; +Cc: git Ivan Zakharyaschev <imz@altlinux.org> writes: > Hello! > > git-1.8.4.4 > > The manpage for git-pull mentions -m in a comment: > > --edit, -e, --no-edit > Invoke an editor before committing successful mechanical merge to 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. > > but it is not accepted actually: I do not think "git pull" ever had the "-m <message>" option; what you are seeing probably is a fallout from attempting to share the documentation pieces between "git pull" and "git merge" too agressively without proofreading. It seems that there are two issues; here is an untested attempt to fix. -- >8 -- Subject: Documentaiotn: 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. 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 same 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 <gitster@pobox.com> --- Documentation/git-pull.txt | 4 ++-- Documentation/merge-options.txt | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 6083aab..200eb22 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -99,10 +99,10 @@ must be given before the options meant for 'git fetch'. Options related to merging ~~~~~~~~~~~~~~~~~~~~~~~~~~ -include::merge-options.txt[] - :git-pull: 1 +include::merge-options.txt[] + -r:: --rebase[=false|true|preserve]:: When true, rebase the current branch on top of the upstream diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt index afba8d4..e134315 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Re* manpage for git-pull mentions a non-valid option -m in a comment 2014-01-14 18:26 ` Re* " Junio C Hamano @ 2014-01-14 18:51 ` Torsten Bögershausen 2014-01-14 19:39 ` Junio C Hamano 0 siblings, 1 reply; 6+ messages in thread From: Torsten Bögershausen @ 2014-01-14 18:51 UTC (permalink / raw) To: Junio C Hamano, Ivan Zakharyaschev; +Cc: git On 2014-01-14 19.26, Junio C Hamano wrote: > Ivan Zakharyaschev <imz@altlinux.org> writes: > >> Hello! >> >> git-1.8.4.4 >> >> The manpage for git-pull mentions -m in a comment: >> >> --edit, -e, --no-edit >> Invoke an editor before committing successful mechanical merge to 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. >> >> but it is not accepted actually: > > I do not think "git pull" ever had the "-m <message>" option; what > you are seeing probably is a fallout from attempting to share the > documentation pieces between "git pull" and "git merge" too > agressively without proofreading. > > It seems that there are two issues; here is an untested attempt to > fix. > > -- >8 -- > Subject: Documentaiotn: exclude irrelevant options from "git pull" ^^^^^^^^^^^^^^ (Small nit ??) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re* manpage for git-pull mentions a non-valid option -m in a comment 2014-01-14 18:51 ` Torsten Bögershausen @ 2014-01-14 19:39 ` Junio C Hamano 2014-01-14 19:54 ` [PATCH 1/2] Documentation: exclude irrelevant options from "git pull" Junio C Hamano 2014-01-14 19:57 ` [PATCH 2/2] Documentation: "git pull" does not have the "-m" option Junio C Hamano 0 siblings, 2 replies; 6+ messages in thread From: Junio C Hamano @ 2014-01-14 19:39 UTC (permalink / raw) To: Torsten Bögershausen; +Cc: Ivan Zakharyaschev, git Torsten Bögershausen <tboegi@web.de> writes: >> Subject: Documentaiotn: exclude irrelevant options from "git pull" > ^^^^^^^^^^^^^^ > (Small nit ??) ;-). They are now a small two patch series, with typofix for the above. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] Documentation: exclude irrelevant options from "git pull" 2014-01-14 19:39 ` Junio C Hamano @ 2014-01-14 19:54 ` Junio C Hamano 2014-01-14 19:57 ` [PATCH 2/2] Documentation: "git pull" does not have the "-m" option Junio C Hamano 1 sibling, 0 replies; 6+ messages in thread From: Junio C Hamano @ 2014-01-14 19:54 UTC (permalink / raw) To: Torsten Bögershausen; +Cc: Ivan Zakharyaschev, git 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 <gitster@pobox.com> --- * To be applied on top of 409b8d82 (Documentation/git-pull: put verbosity options before merge/fetch ones, 2010-02-24) 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 d47f9dd..0e7a1fe 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 -- 1.8.5.3-493-gb139ac2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] Documentation: "git pull" does not have the "-m" option 2014-01-14 19:39 ` Junio C Hamano 2014-01-14 19:54 ` [PATCH 1/2] Documentation: exclude irrelevant options from "git pull" Junio C Hamano @ 2014-01-14 19:57 ` Junio C Hamano 1 sibling, 0 replies; 6+ messages in thread From: Junio C Hamano @ 2014-01-14 19:57 UTC (permalink / raw) To: Torsten Bögershausen; +Cc: Ivan Zakharyaschev, git 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 <gitster@pobox.com> --- * Merge the result of applying 1/2 on top of 409b8d8 to 66fa1b2, and then apply this. 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 f192cd2..d462bcc 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 -- 1.8.5.3-493-gb139ac2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-14 20:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-14 2:09 BUG: manpage for git-pull mentions a non-valid option -m in a comment Ivan Zakharyaschev 2014-01-14 18:26 ` Re* " Junio C Hamano 2014-01-14 18:51 ` Torsten Bögershausen 2014-01-14 19:39 ` Junio C Hamano 2014-01-14 19:54 ` [PATCH 1/2] Documentation: exclude irrelevant options from "git pull" Junio C Hamano 2014-01-14 19:57 ` [PATCH 2/2] Documentation: "git pull" does not have the "-m" option Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).