diff --git a/functions/geometry_git b/functions/geometry_git index 364d6fc..42f59e8 100644 --- a/functions/geometry_git +++ b/functions/geometry_git @@ -65,12 +65,17 @@ geometry_git_conflicts() { local conflicts conflict_list local file_count local total raw_total + local git_root conflicts=$(git diff --name-only --diff-filter=U -z 2>/dev/null) [[ -z "$conflicts" ]] && return + _grep=${GEOMETRY_GIT_GREP:=${commands[rg]:=${commands[ag]:=${commands[grep]}}}} - conflict_list=$($_grep -cH '^=======$' ${(0)conflicts}) + + git_root=$(git rev-parse --show-toplevel) + + conflict_list=$($_grep -cH '^=======$' ${git_root/$^conflicts}) file_count="${(w)#conflict_list}"