eec3dc607c40b33a828938e396a459e70d8b01ed
- Author
- Felipe Contreras <felipe.contreras@gmail.com>
- Committer
- Felipe Contreras <felipe.contreras@gmail.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/gitfast/git-completion.bash b/plugins/gitfast/git-completion.bash
2index 5944c824abe9aa4dee8b63b0e91a047125722b22..e3918c87e3adf32a9d7a4f0320c92c497376b9b5 100644
3--- a/plugins/gitfast/git-completion.bash
4+++ b/plugins/gitfast/git-completion.bash
5@@ -10,6 +10,7 @@
6 # *) local and remote tag names
7 # *) .git/remotes file names
8 # *) git 'subcommands'
9+# *) git email aliases for git-send-email
10 # *) tree paths within 'ref:path/to/file' expressions
11 # *) file paths within current working directory and index
12 # *) common --long-options
13@@ -663,10 +664,11 @@ __git_list_porcelain_commands ()
14 check-mailmap) : plumbing;;
15 check-ref-format) : plumbing;;
16 checkout-index) : plumbing;;
17+ column) : internal helper;;
18 commit-tree) : plumbing;;
19 count-objects) : infrequent;;
20- credential-cache) : credentials helper;;
21- credential-store) : credentials helper;;
22+ credential) : credentials;;
23+ credential-*) : credentials helper;;
24 cvsexportcommit) : export;;
25 cvsimport) : import;;
26 cvsserver) : daemon;;
27@@ -735,35 +737,28 @@ __git_list_porcelain_commands ()
28 __git_porcelain_commands=
29 __git_compute_porcelain_commands ()
30 {
31- __git_compute_all_commands
32 test -n "$__git_porcelain_commands" ||
33 __git_porcelain_commands=$(__git_list_porcelain_commands)
34 }
35
36-__git_pretty_aliases ()
37+# Lists all set config variables starting with the given section prefix,
38+# with the prefix removed.
39+__git_get_config_variables ()
40 {
41- local i IFS=$'\n'
42- for i in $(git --git-dir="$(__gitdir)" config --get-regexp "pretty\..*" 2>/dev/null); do
43- case "$i" in
44- pretty.*)
45- i="${i#pretty.}"
46- echo "${i/ */}"
47- ;;
48- esac
49+ local section="$1" i IFS=$'\n'
50+ for i in $(git --git-dir="$(__gitdir)" config --name-only --get-regexp "^$section\..*" 2>/dev/null); do
51+ echo "${i#$section.}"
52 done
53 }
54
55+__git_pretty_aliases ()
56+{
57+ __git_get_config_variables "pretty"
58+}
59+
60 __git_aliases ()
61 {
62- local i IFS=$'\n'
63- for i in $(git --git-dir="$(__gitdir)" config --get-regexp "alias\..*" 2>/dev/null); do
64- case "$i" in
65- alias.*)
66- i="${i#alias.}"
67- echo "${i/ */}"
68- ;;
69- esac
70- done
71+ __git_get_config_variables "alias"
72 }
73
74 # __git_aliased_command requires 1 argument
75@@ -1114,7 +1109,7 @@ _git_commit ()
76
77 case "$cur" in
78 --cleanup=*)
79- __gitcomp "default strip verbatim whitespace
80+ __gitcomp "default scissors strip verbatim whitespace
81 " "" "${cur##--cleanup=}"
82 return
83 ;;
84@@ -1174,7 +1169,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
85 --no-prefix --src-prefix= --dst-prefix=
86 --inter-hunk-context=
87 --patience --histogram --minimal
88- --raw --word-diff
89+ --raw --word-diff --word-diff-regex=
90 --dirstat --dirstat= --dirstat-by-file
91 --dirstat-by-file= --cumulative
92 --diff-algorithm=
93@@ -1317,6 +1312,7 @@ _git_grep ()
94 --full-name --line-number
95 --extended-regexp --basic-regexp --fixed-strings
96 --perl-regexp
97+ --threads
98 --files-with-matches --name-only
99 --files-without-match
100 --max-depth
101@@ -1448,7 +1444,7 @@ _git_log ()
102 return
103 ;;
104 --decorate=*)
105diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh
106index f18aedc73be9daf4aab564beecb7bae29ea759c9..64219e631ab9babdc9eb78137478bde2c2cabec8 100644
107--- a/plugins/gitfast/git-prompt.sh
108+++ b/plugins/gitfast/git-prompt.sh
109@@ -66,6 +66,10 @@
110 # git always compare HEAD to @{upstream}
111 # svn always compare HEAD to your SVN upstream
112 #
113+# You can change the separator between the branch name and the above
114+# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator
115+# is SP.
116+#
117 # By default, __git_ps1 will compare HEAD to your SVN upstream if it can
118 # find one, or @{upstream} otherwise. Once you have set
119 # GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
120@@ -472,10 +476,9 @@ __git_ps1 ()
121 if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
122 [ "$(git config --bool bash.showDirtyState)" != "false" ]
123 then
124- git diff --no-ext-diff --quiet --exit-code || w="*"
125- if [ -n "$short_sha" ]; then
126- git diff-index --cached --quiet HEAD -- || i="+"
127- else
128+ git diff --no-ext-diff --quiet || w="*"
129+ git diff --no-ext-diff --cached --quiet || i="+"
130+ if [ -z "$short_sha" ] && [ -z "$i" ]; then
131 i="#"
132 fi
133 fi
134@@ -487,7 +490,7 @@ __git_ps1 ()
135
136 if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
137 [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
138- git ls-files --others --exclude-standard --error-unmatch -- ':/*' >/dev/null 2>/dev/null
139+ git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null
140 then
141 u="%${ZSH_VERSION+%}"
142 fi