File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ 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
6
## Unreleased
7
+
8
+ ### Fixed
7
9
- Fix git functions erroring out in non-git directories (thanks @duncanbeevers !)
10
+ - Git conflict counting with multiple files (thanks @gluxon !)
8
11
9
12
## 2.2.0 - 2020-01-13
10
13
@@ -21,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
21
24
- lazy load functions with autoload instead of sourcing (thanks @alxbl !)
22
25
23
26
### Added
24
- - geometry_newline for two-line prompts (thanks @ducklin5 )
27
+ - geometry_newline for two-line prompts (thanks @ducklin5 ! )
25
28
- geometry::hostcolor to allow host-based colorization for all (thanks @crasx !)
26
29
27
30
### Fixed
@@ -105,8 +108,9 @@ Now uses GEOMETRY_SEPARATOR like everything else.
105
108
- Dozens of other small fixes
106
109
107
110
## 1.0.0 - 2017-04-05
111
+
108
112
### Added
109
113
- Change Log file
110
114
- Initial release features
111
115
112
- [ Unreleased ] : https://github.com/geometry-zsh/geometry/compare/v1.0 .0...HEAD
116
+ [ Unreleased ] : https://github.com/geometry-zsh/geometry/compare/v2.2 .0...HEAD
Original file line number Diff line number Diff line change @@ -57,21 +57,22 @@ geometry_git_remote() {
57
57
echo "$unpushed $unpulled"
58
58
}
59
59
60
+ geometry_git_symbol() { echo ${(j: :):-$(geometry_git_rebase) $(geometry_git_remote)}; }
61
+
60
62
geometry_git_conflicts() {
61
63
_geometry_git_guard || return
62
64
local _grep
63
65
local conflicts conflict_list
64
- local file_count raw_file_count
66
+ local file_count
65
67
local total raw_total
66
- conflicts=$(git diff --name-only --diff-filter=U)
68
+ conflicts=$(git diff --name-only --diff-filter=U -z )
67
69
68
70
[[ -z "$conflicts" ]] && return
69
71
70
72
_grep=${GEOMETRY_GIT_GREP:=${commands[rg]:=${commands[ag]:=${commands[grep]}}}}
71
- conflict_list=$($_grep -cH '^=======$' $conflicts)
73
+ conflict_list=$($_grep -cH '^=======$' ${(0) conflicts} )
72
74
73
- raw_file_count="${#${(@f)conflict_list}}"
74
- file_count=${raw_file_count##*( )}
75
+ file_count="${(w)#conflict_list}"
75
76
76
77
raw_total=$(echo $conflict_list | cut -d ':' -f2 | paste -sd+ - | bc)
77
78
total=${raw_total##*( )}
You can’t perform that action at this time.
0 commit comments