Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
counsel.el: counsel--git-grep-count-func-default submodule support
(counsel--git-grep-count-func-default): Ask Git where the .git directory is for the repository in the current directory. Modern Git puts all the git directories for submodules underneath the top level `.git` directory and then leaves a "git-file" in the submodule which points back to the repository inside the top-level .git directory. This means, that within a submodule, the `.git` file contains something like: gitdir: ../../.git/modules/submodule-repo-name counsel--git-grep-count-func-default runs "du -s .git 2>/dev/null" which is bound to give a very small answer for just this small file. So, let's ask Git to tell us where the real .git directory is and calculate the size of that. Fixes abo-abo#1558
- Loading branch information