File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 3
3
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
4
4
and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
5
5
6
+ ## Unreleased
7
+
8
+ ### Fixed
9
+ - geometry_git complaining when not in a work-tree
10
+
6
11
## 2.0.5 - 2019-10-14
7
12
8
13
### Fixed
Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ geometry_git_conflicts() {
84
84
geometry_git () {
85
85
(( $+ commands[git] )) || return
86
86
87
- command git rev-parse --git-dir > /dev/null 2>&1 || return
87
+ local git_dir; git_dir=$( git rev-parse --git-dir 2>&1 ) || return
88
+ pushd -q " ${git_dir} /.."
88
89
89
90
$( command git rev-parse --is-bare-repository 2> /dev/null) \
90
91
&& ansi ${GEOMETRY_GIT_COLOR_BARE:= blue} ${GEOMETRY_GIT_SYMBOL_BARE:= " ⬢" } \
@@ -97,6 +98,6 @@ geometry_git() {
97
98
$( geometry_git_status)
98
99
)
99
100
100
- local separator= ${ GEOMETRY_GIT_SEPARATOR:- " :: " }
101
- echo -n $( geometry_git_symbol ) $( geometry_git_branch ) ${(pj. $separator .)geometry_git_details}
101
+ echo -n $( geometry_git_symbol ) $( geometry_git_branch ) ${(ej. ${ GEOMETRY_GIT_SEPARATOR:- " :: " } .)geometry_git_details }
102
+ popd -q
102
103
}
You can’t perform that action at this time.
0 commit comments