git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git command unrecognized argument issue?
@ 2017-07-18 17:28 Gilbert Catipon
  0 siblings, 0 replies; only message in thread
From: Gilbert Catipon @ 2017-07-18 17:28 UTC (permalink / raw)
  To: git

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$

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-18 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18 17:28 git command unrecognized argument issue? Gilbert Catipon

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).