aboutsummaryrefslogtreecommitdiff
path: root/gitstatus.plugin.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-05-30 11:35:40 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-05-30 11:35:40 +0300
commitba83466e1da75d9260ebbb145215d9c46d6eadf6 (patch)
tree5917ecfe20d40ae821b7cacc4382ecdc2e004a8a /gitstatus.plugin.zsh
parent9609a835ca2eb3089e35269a05369833e9ec0ba2 (diff)
Squashed 'gitstatus/' changes from 6d00edd0..113f1f69
113f1f69 release gitstatusd-linux-x86_64 v1.5.0 e193be52 expose HEAD's commit message 815301f1 do not redefine `exec` and `builtin` in bash bindings (#235) 97c2aa17 Make `--version-glob` to receive an argument (#216) 95e549fd Support building on OpenBSD (#208) b054ddf2 make homebrew instructions work on systems other than darwin-x86_64 (#205) 98f99ade fix brew formula check git-subtree-dir: gitstatus git-subtree-split: 113f1f698667d12906d97e3818aec5d760dc6e3d
Diffstat (limited to 'gitstatus.plugin.zsh')
-rw-r--r--gitstatus.plugin.zsh8
1 files changed, 7 insertions, 1 deletions
diff --git a/gitstatus.plugin.zsh b/gitstatus.plugin.zsh
index ca0fb311..c37af1d7 100644
--- a/gitstatus.plugin.zsh
+++ b/gitstatus.plugin.zsh
@@ -15,6 +15,8 @@
# VCS_STATUS_COMMIT=c000eddcff0fb38df2d0137efe24d9d2d900f209
# VCS_STATUS_COMMITS_AHEAD=0
# VCS_STATUS_COMMITS_BEHIND=0
+# VCS_STATUS_COMMIT_ENCODING=''
+# VCS_STATUS_COMMIT_SUMMARY='pull upstream changes from gitstatus'
# VCS_STATUS_HAS_CONFLICTED=0
# VCS_STATUS_HAS_STAGED=0
# VCS_STATUS_HAS_UNSTAGED=1
@@ -88,6 +90,8 @@ typeset -g _gitstatus_plugin_dir"${1:-}"="${${(%):-%x}:A:h}"
# VCS_STATUS_WORKDIR Git repo working directory. Not empty.
# VCS_STATUS_COMMIT Commit hash that HEAD is pointing to. Either 40 hex digits or
# empty if there is no HEAD (empty repo).
+# VCS_STATUS_COMMIT_ENCODING Encoding of the HEAD's commit message. Empty value means UTF-8.
+# VCS_STATUS_COMMIT_SUMMARY The first paragraph of the HEAD's commit message as one line.
# VCS_STATUS_LOCAL_BRANCH Local branch name or empty if not on a branch.
# VCS_STATUS_REMOTE_NAME The remote name, e.g. "upstream" or "origin".
# VCS_STATUS_REMOTE_BRANCH Upstream branch name. Can be empty.
@@ -329,7 +333,9 @@ function _gitstatus_process_response"${1:-}"() {
VCS_STATUS_PUSH_COMMITS_AHEAD \
VCS_STATUS_PUSH_COMMITS_BEHIND \
VCS_STATUS_NUM_SKIP_WORKTREE \
- VCS_STATUS_NUM_ASSUME_UNCHANGED in "${(@)resp[3,27]}"; do
+ VCS_STATUS_NUM_ASSUME_UNCHANGED \
+ VCS_STATUS_COMMIT_ENCODING \
+ VCS_STATUS_COMMIT_SUMMARY in "${(@)resp[3,29]}"; do
done
typeset -gi VCS_STATUS_{INDEX_SIZE,NUM_STAGED,NUM_UNSTAGED,NUM_CONFLICTED,NUM_UNTRACKED,COMMITS_AHEAD,COMMITS_BEHIND,STASHES,NUM_UNSTAGED_DELETED,NUM_STAGED_NEW,NUM_STAGED_DELETED,PUSH_COMMITS_AHEAD,PUSH_COMMITS_BEHIND,NUM_SKIP_WORKTREE,NUM_ASSUME_UNCHANGED}
typeset -gi VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))