Re: How to implement the "amend!" commit ?

3 messages, 3 authors, 2021-01-17 · open the first message on its own page

Re: How to implement the "amend!" commit ?

From: Junio C Hamano <hidden>
Date: 2021-01-14 20:33:37

Phillip Wood [off-list ref] writes:
This is the only option that is backwards
compatible. `--fixup=:/<text> ` still works and can be used with the
new syntax as `--fixup=amend::/<text>`.
Do you mean both "--fixup=:/<text>" and "--fixup=amend::/<text>"
work and do the same thing?  If so, that is good.
Note that we intend to allow
accept any prefix of "amend" and "reword" so --fixup=a:<commit> would
work.
"a" and "r" may happen to be unique but we would not want to be
limited to these two forever---future developers are allowed to
invent other clever variants.  So let's say "accept unique prefix as
abbreviation for these operating mode words like 'amend' and 'reword'"

Re: How to implement the "amend!" commit ?

From: Phillip Wood <hidden>
Date: 2021-01-15 10:30:15

Hi Junio

On 14/01/2021 20:32, Junio C Hamano wrote:
Phillip Wood [off-list ref] writes:
quoted
This is the only option that is backwards
compatible. `--fixup=:/<text> ` still works and can be used with the
new syntax as `--fixup=amend::/<text>`.
Do you mean both "--fixup=:/<text>" and "--fixup=amend::/<text>"
work and do the same thing?  If so, that is good.
"--fixup=:/<text>" will work as it does now and "--fixup=amend::/<text>" 
will create an amend! commit.
quoted
Note that we intend to allow
accept any prefix of "amend" and "reword" so --fixup=a:<commit> would
work.
"a" and "r" may happen to be unique but we would not want to be
limited to these two forever---future developers are allowed to
invent other clever variants.  So let's say "accept unique prefix as
abbreviation for these operating mode words like 'amend' and 'reword'"
Sure - that's actually what I meant but I wasn't very clear

Do you think we want to support "--fixup=squash:<commit>" so there is a 
uniform way for creating all flavors or is that just going to be 
confusing when we have "--squash=<commit>" already?

Best Wishes

Phillip

Re: How to implement the "amend!" commit ?

From: Charvi Mendiratta <hidden>
Date: 2021-01-17 03:44:28

Hi Junio and Phillip,

On Fri, 15 Jan 2021 at 02:02, Junio C Hamano [off-list ref] wrote:
Phillip Wood [off-list ref] writes:
[...]
quoted
Note that we intend to allow
accept any prefix of "amend" and "reword" so --fixup=a:<commit> would
work.
"a" and "r" may happen to be unique but we would not want to be
limited to these two forever---future developers are allowed to
invent other clever variants.  So let's say "accept unique prefix as
abbreviation for these operating mode words like 'amend' and 'reword'"
Earlier, I thought to implement the UI of amend! commit as :
"git commit --fixup=a/amend:<commit>"

So users can either use 'a' as abbreviation or 'amend'. But I want to once
confirm if I got this right ? As I am doubtful about, what does allowing to
accept any prefix of "amend" and "reword" means ?

Thanks and Regards,
Charvi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help