Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

fatal: Not a git repository #102

Closed
3cooper opened this issue Sep 8, 2016 · 9 comments
Closed

fatal: Not a git repository #102

3cooper opened this issue Sep 8, 2016 · 9 comments

Comments

@3cooper
Copy link

3cooper commented Sep 8, 2016

When I run phpsa ( >vendor/ovr/phpsa/bin/phpsa check file.php ) I get the findings from the analysis but I also get lines saying: fatal: Not a git repository (or any of the parent directories): .git. I am new to composer and phpsa so I could have something configured incorrectly. Any help would be great.

@ddmler
Copy link
Collaborator

ddmler commented Sep 8, 2016

Try to remove your vendor directory and run composer install again.

@3cooper
Copy link
Author

3cooper commented Sep 8, 2016

I did, reinstalled composer, and then reinstalled phpsa and I still get the error.

>git --version
git version 2.9.3

>php --version
PHP 5.5.36 (cli) (built: May 29 2016 01:07:06)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

>php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
>php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
>php composer-setup.php
>php -r "unlink('composer-setup.php');"

>php composer.phar require ovr/phpsa

@ravage84
Copy link
Contributor

ravage84 commented Sep 8, 2016

This happened to me, too, but I didn't install it through Composer but used phpsa (0.5.0) as phar on my SVN working copy.

@3cooper
Copy link
Author

3cooper commented Sep 8, 2016

I just uninstalled the composer version and installed the phar version. I get the same error.

>phpsa check FormDataAdapter.inc 
fatal: Not a git repository (or any of the parent directories): .git

Notice:  Missing docblock for __construct() method in FormDataAdapter.inc on 78 [missing-docblock]

fatal: Not a git repository (or any of the parent directories): .git

Notice:  Missing docblock for %s() property in FormDataAdapter.inc on 13 [missing-docblock]

fatal: Not a git repository (or any of the parent directories): .git

Notice:  Missing docblock for %s() property in FormDataAdapter.inc on 14 [missing-docblock]

fatal: Not a git repository (or any of the parent directories): .git

Notice:  Please use [] (short syntax) for array definition. in FormDataAdapter.inc on 92 [array.short-syntax]

fatal: Not a git repository (or any of the parent directories): .git

Similar errors continue down the screen

@ddmler
Copy link
Collaborator

ddmler commented Sep 8, 2016

Try to edit phpsa.yml config file and set blame to false. On true it executes git blame --show-email for every shown notice.
The default should be false so we will comment that line out I think.
It seems that the configuration setting isn't working so you can't turn it off at the moment.

@3cooper
Copy link
Author

3cooper commented Sep 8, 2016

I am new to phar. Where can i find the yml file? I am on OS X.

@ddmler
Copy link
Collaborator

ddmler commented Sep 8, 2016

It's in the directory of phpsa. It's .phpsa.yml and it's a hidden file (because of the . in front) so you won't see it if you did not configure it. But the configuration there is not working at the moment.
For now try to do this:

vendor/ovr/phpsa/bin/phpsa check file.php --blame=false

This should remove the git error messages.

@3cooper
Copy link
Author

3cooper commented Sep 8, 2016

That did it. Thanks.

@ddmler
Copy link
Collaborator

ddmler commented Sep 26, 2016

closed - not really a bug, blame will be default off with PR from K-Phoen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants