* Bug Report - Git does not require a space between shorthand flags and the commit-message
@ 2023-07-13 13:04 uxecw
2023-07-14 0:48 ` brian m. carlson
0 siblings, 1 reply; 2+ messages in thread
From: uxecw @ 2023-07-13 13:04 UTC (permalink / raw)
To: git
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"`
What's different between what you expected and what actually happened?
Anything else you want to add:
Please review the rest of the bug report below.
You can delete any lines you don't wish to share.
[System Info]
git version:
git version 2.34.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
Wed Jun 21 15:35:31 UTC 2 x86_64
compiler info: gnuc: 11.3
libc info: glibc: 2.35
$SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks]
not run from a git repository - no hooks to show
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug Report - Git does not require a space between shorthand flags and the commit-message
2023-07-13 13:04 Bug Report - Git does not require a space between shorthand flags and the commit-message uxecw
@ 2023-07-14 0:48 ` brian m. carlson
0 siblings, 0 replies; 2+ messages in thread
From: brian m. carlson @ 2023-07-14 0:48 UTC (permalink / raw)
To: uxecw; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-14 0:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 13:04 Bug Report - Git does not require a space between shorthand flags and the commit-message uxecw
2023-07-14 0:48 ` brian m. carlson
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).