Re: [PATCH v3 6/6] doc/git-commit: add documentation for fixup=[amend|reword] options

2 messages, 2 authors, 2021-03-05 · open the first message on its own page

Re: [PATCH v3 6/6] doc/git-commit: add documentation for fixup=[amend|reword] options

From: Junio C Hamano <hidden>
Date: 2021-03-04 22:18:16

Charvi Mendiratta [off-list ref] writes:
quoted
no paths, i.e.  If you have --fixup=amend, you can do

    $ git commit --fixup=amend:<original> --only

and you do not need --fixup=reword:<original> at all, no?
Maybe as an alternative User interface, we can remove the
`--fixup=reword:<original>`.

But for this patch, as we have kept separate suboption
`--fixup=reword:<original>` , so if now we do
`--fixup=amend:<original> --only` then it will return the error as
below :
fatal: No paths with --include/--only does not make sense.
Yes, but it is something we can easily fix, just like we made
"--only" without any pathname to work with "--amend" (or with
"--allow-empty").

The reason I brought it up was not because "--fixup=reword" is not
needed as a short-hand for "--only --fixup=amend" (but thinking
about it again, I do not think it is so bad), but primarily in
response to "would it be easier for users if we had reword! insn in
addition to amend! verb in the todo file?" that was raised earlier
in the thread.  If we position "--fixup=reword" as a short-hand
and/or a syntax sugar for "--fixup=amend" and advertise it as such
sufficiently to educate users, it would be easier for users to
understand why they both result in "amend!".

Re: [PATCH v3 6/6] doc/git-commit: add documentation for fixup=[amend|reword] options

From: Charvi Mendiratta <hidden>
Date: 2021-03-05 06:15:06

On Fri, 5 Mar 2021 at 03:48, Junio C Hamano [off-list ref] wrote:
Charvi Mendiratta [off-list ref] writes:
quoted
quoted
no paths, i.e.  If you have --fixup=amend, you can do

    $ git commit --fixup=amend:<original> --only

and you do not need --fixup=reword:<original> at all, no?
Maybe as an alternative User interface, we can remove the
`--fixup=reword:<original>`.

But for this patch, as we have kept separate suboption
`--fixup=reword:<original>` , so if now we do
`--fixup=amend:<original> --only` then it will return the error as
below :
fatal: No paths with --include/--only does not make sense.
Yes, but it is something we can easily fix, just like we made
"--only" without any pathname to work with "--amend" (or with
"--allow-empty").
Agree.
The reason I brought it up was not because "--fixup=reword" is not
needed as a short-hand for "--only --fixup=amend" (but thinking
about it again, I do not think it is so bad), but primarily in
response to "would it be easier for users if we had reword! insn in
addition to amend! verb in the todo file?" that was raised earlier
in the thread.  If we position "--fixup=reword" as a short-hand
and/or a syntax sugar for "--fixup=amend" and advertise it as such
sufficiently to educate users, it would be easier for users to
understand why they both result in "amend!".
Okay, so now if it's Ok to keep the short-hand "--fixup=reword" ? then
I think making the documentation more clear would be sufficient to
serve it to the users ?
Otherwise if the votes are more that the user will get confused as
both results in "amend!", then should we change this patch to "--only
--fixup=amend" ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help