Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Aug 31, 2014

Conversation

jediant
Copy link

@jediant jediant commented Dec 19, 2012

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

@ncanceill ncanceill mentioned this pull request May 7, 2014
5 tasks
robbyrussell added a commit that referenced this pull request Aug 31, 2014
Exit early from git plugin if not in git repo.
@robbyrussell robbyrussell merged commit c07bf98 into ohmyzsh:master Aug 31, 2014
@robbyrussell
Copy link
Member

@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?

@ncanceill
Copy link
Contributor

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.

@gsemet
Copy link
Contributor

gsemet 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

@ncanceill
Copy link
Contributor

Yes, #2790 reverts this.

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

Successfully merging this pull request may close these issues.

None yet

4 participants