Added check for .git directory in current, before wasting time querying git. This saves seconds on my pc.
Added check for .git directory in current, before wasting time queryi…
…ng git. This saves seconds on my pc.
@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?
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.
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
Yes, #2790 reverts this.