From: Charvi Mendiratta Date: Sun, 17 Jan 2021 07:46:26 GMT Subject: Re: How to implement the "amend!" commit ? Message-ID: In-Reply-To: Hi Junio, On Sun, 17 Jan 2021 at 10:03, Junio C Hamano wrote: > > Charvi Mendiratta writes: > > > Earlier, I thought to implement the UI of amend! commit as : > > "git commit --fixup=a/amend:" > > > > 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 ? > > It means that all of these do the same thing ... > > git commit --fixup=amend: > git commit --fixup=amen: > git commit --fixup=ame: > git commit --fixup=am: > git commit --fixup=a: > > ... until somebody more brilliant than either of us comes along and > invents another operation that sits next to 'amend' and 'reword', > say, 'annoy'. At that point, > > git commit --fixup=a: > > no longer uniquely identifies a choice among three ('amend', > 'annoy', or 'reword') and you'd give an error message, but > > git commit --fixup=am: > > will keep working as an abbreviation for "amend". Thanks for explaining, now I can relate with the previous discussions and will look around for the implementation in the above way. I think may be we can do this while parsing the options and checking for the list of prefixes, I am not sure but will look into it. Thanks and Regards, Charvi