Browse Source

Rename the Git status ignore submodules zstyle pattern

master
Sorin Ionescu 12 years ago
parent
commit
bd9327ca3f
  1. 17
      modules/git/alias.zsh
  2. 8
      modules/git/functions/git-info
  3. 2
      runcoms/zpreztorc

17
modules/git/alias.zsh

@ -5,6 +5,19 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
#
# Settings
#
#
# Status
zstyle -s ':prezto:module:git:status:ignore' submodules '_git_status_ignore_submodules' \
|| _git_status_ignore_submodules='none'
#
# Aliases
#
# Git # Git
alias g='git' alias g='git'
@ -151,8 +164,8 @@ alias gSu='git submodule foreach git pull origin master'
alias gSx='git-submodule-remove' alias gSx='git-submodule-remove'
# Working Copy (w) # Working Copy (w)
alias gws='git status --short' alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
alias gwS='git status' alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
alias gwd='git diff --no-ext-diff' alias gwd='git diff --no-ext-diff'
alias gwD='git diff --no-ext-diff --word-diff' alias gwD='git diff --no-ext-diff --word-diff'
alias gwr='git reset --soft' alias gwr='git reset --soft'

8
modules/git/functions/git-info

@ -192,7 +192,7 @@ function git-info {
local dirty=0 local dirty=0
local dirty_format local dirty_format
local dirty_formatted local dirty_formatted
local ignore_submodule local ignore_submodules
local -A info_formats local -A info_formats
local info_format local info_format
local line_number=0 local line_number=0
@ -258,9 +258,9 @@ function git-info {
ahead_and_behind_cmd='git rev-list --count --left-right HEAD...@{upstream}' ahead_and_behind_cmd='git rev-list --count --left-right HEAD...@{upstream}'
# Ignore submodule status. # Ignore submodule status.
zstyle -s ':prezto:module:git:ignore' submodule 'ignore_submodule' zstyle -s ':prezto:module:git:status:ignore' submodules 'ignore_submodules'
if [[ -n "$ignore_submodule" ]]; then if [[ -n "$ignore_submodules" ]]; then
status_cmd+=" --ignore-submodules=${ignore_submodule}" status_cmd+=" --ignore-submodules=${ignore_submodules}"
fi fi
# Format commit. # Format commit.

2
runcoms/zpreztorc

@ -49,7 +49,7 @@ zstyle ':prezto:module:editor' keymap 'emacs'
# #
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'. # Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
# zstyle ':prezto:module:git:ignore' submodule 'all' # zstyle ':prezto:module:git:status:ignore' submodules 'all'
# #
# GNU Utility # GNU Utility

Loading…
Cancel
Save