Re: Bug Report - Git does not require a space between shorthand flags and the commit-message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-07-13 at 13:04:37, uxecw wrote:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> Rebasing.
> I entered `git commit —amend` (one hypen istead of two) accidently and it
> passed as defacto `git commit —all —message "end"`.
> I think because of the missing space git should have rejected the given
> input.
> 
> What did you expect to happen? (Expected behavior)
> Input should have been rejected
> 
> What happened instead? (Actual behavior)
> `git commit —all —message "end"`

I believe this is standard Unix behaviour.  One can combine
single-character options, including a final single-character option that
takes an argument, and the argument can be appended to the option.

For example, I frequently type "git commit -svS", and I could well type
"git commit -svS0223b187" (my OpenPGP key ID).  That also works
similarly with OpenSSH: the command "ssh -CoUser=foo server" works just
fine.

So I think it's best for Git to preserve the existing behaviour since
it's standard for other tools as well (and, I believe, the
POSIX-mandated behaviour).
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux