git command unrecognized argument issue?

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

 



Hi,

I noticed a surprise inconsistency when using the git command. Using
git version 2.7.4 and trying most of the commands listed by git –help
usually output error: and usage text when passing an invalid argument.

The exception was the commands log and show. Looks like a cosmetic
issue but I didn’t know if this is a dup issue/already in issue
tracker.

Thanks,
Gilbert Catipon


So to reproduce the issue:

gilbert@tea:~/dev/profile$ git log --foobar
fatal: unrecognized argument: --foobar

• Using a for loop to check a list of commands returns 2 fatal commands:

gilbert@tea:~/dev/profile$ for k in bisect grep log show status; do
echo $k; git $k --foobarf; done

log
fatal: unrecognized argument: --foobarf
show
fatal: unrecognized argument: --foobarf
status
error: unknown option `foobarf'
usage: git status [<options>] [--] <pathspec>...

• All these commands gave expected error
for k in branch checkout commit diff merge rebase tag; do echo $k ;
git $k --asdfasd; done

• On ubuntu
gilbert@tea:~/dev/profile$ uname -a
Linux tea 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux

• Setting GIT_TRACE=/tmp/git_trace.log

gilbert@tea:~/dev/profile$ cat /tmp/git_trace.log
09:59:47.703082 git.c:561               trace: exec: 'git-bisect' '--foobarf'
09:59:47.703164 run-command.c:334       trace: run_command:
'git-bisect' '--foobarf'
09:59:47.710513 git.c:344               trace: built-in: git
'rev-parse' '--git-dir'
09:59:47.712607 git.c:344               trace: built-in: git
'rev-parse' '--show-cdup'
09:59:47.714954 git.c:344               trace: built-in: git
'rev-parse' '--git-path' 'objects'
09:59:47.720353 git.c:344               trace: built-in: git 'grep' '--foobarf'
09:59:47.723324 git.c:344               trace: built-in: git 'log' '--foobarf'
09:59:47.726310 git.c:344               trace: built-in: git 'show' '--foobarf'
09:59:47.729065 git.c:344               trace: built-in: git 'status'
'--foobarf'
gilbert@tea:~/dev/profile$




[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