File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313
1414### Fixed
1515- geometry_git complaining when not in a work-tree
16+ - geometry_git works in submodules now, (thanks @JokeNeverSoke !)
1617
1718### Removed
1819- GEOMETRY_GIT_SEPARATOR hidden feature, was the only function that didnt work like the others.
Original file line number Diff line number Diff line change @@ -80,22 +80,20 @@ geometry_git_conflicts() {
8080geometry_git() {
8181 (( $+commands[git] )) || return
8282
83- local git_dir; git_dir=$(git rev-parse --git-dir 2>&1) || return
84- pushd -q "$git_dir"/..
83+ git rev-parse --absolute-git-dir 2>&1 >/dev/null || return
8584
8685 $(command git rev-parse --is-bare-repository 2>/dev/null) \
8786 && ansi ${GEOMETRY_GIT_COLOR_BARE:=blue} ${GEOMETRY_GIT_SYMBOL_BARE:="⬢"} \
8887 && return
8988
9089 local git_info && git_info=(
91- $( geometry_git_symbol)
92- $( geometry_git_branch)
93- $( geometry_git_conflicts)
94- $( geometry_git_time)
95- $( geometry_git_stashes)
96- $( geometry_git_status)
90+ geometry_git_symbol \
91+ geometry_git_branch \
92+ geometry_git_conflicts \
93+ geometry_git_time \
94+ geometry_git_stashes \
95+ geometry_git_status
9796 )
9897
99- echo -n ${(ej.${GEOMETRY_SEPARATOR:- }.)git_info}
100- popd -q 2>/dev/null
98+ geometry::wrap $PWD $git_info
10199}
You can’t perform that action at this time.
0 commit comments