Exit early from git plugin if not in git repo. #1504

Merged
merged 1 commit into from Aug 31, 2014

Conversation

Projects
None yet
4 participants

jediant commented Dec 19, 2012

Added check for .git directory in current, before wasting time querying git. This saves seconds on my pc.

Anton Eicher Added check for .git directory in current, before wasting time queryi…
…ng git. This saves seconds on my pc.
fdb3c0e

ncanceill referenced this pull request May 7, 2014

Merged

[UPDATE] Plugin: git #2790

5 of 5 tasks complete

robbyrussell merged commit c07bf98 into robbyrussell:master Aug 31, 2014

Owner

robbyrussell commented Sep 4, 2014

@jediant It looks like causes some quirks where current_branch stops working when you're in a subdirectory. I need to revert this for now. Can you think of a better solution that meets both scenarios?

Contributor

ncanceill commented Apr 5, 2015

Yeah, as @blueyed had pointed out prior to the time of merging this, this fix does not work at all.

git commands exit pretty quickly when not in a repository anyway, so this was removed from #2790.

Contributor

Stibbons commented Apr 5, 2015

Please revert this patch. This is invalid since git command work in subdirectory. You need to look for every parent of the current directory to see if these isn't a .git directory

Contributor

ncanceill commented Apr 5, 2015

Yes, #2790 reverts this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment