5a282b9b3050e4851c15cfdb9d79af6a708988b7

Author
Artyom Fedosov <50590380+artyom-fedosov@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

chore(git): remove quotes around `$#` (#13403)

Diff

 1diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
 2index a0052891aae2fbcbf7d05538f5b70e5357c3e634..c11799208ec0772ccbbccdfd51139ed18077d5fa 100644
 3--- a/plugins/git/git.plugin.zsh
 4+++ b/plugins/git/git.plugin.zsh
 5@@ -102,7 +102,7 @@ function work_in_progress() {
 6 alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
 7 
 8 function ggpnp() {
 9-  if [[ "$#" == 0 ]]; then
10+  if [[ $# == 0 ]]; then
11     ggl && ggp
12   else
13     ggl "${*}" && ggp "${*}"
14@@ -281,7 +281,7 @@ alias gprav='git pull --rebase --autostash -v'
15 
16 function ggu() {
17   local b
18-  [[ "$#" != 1 ]] && b="$(git_current_branch)"
19+  [[ $# != 1 ]] && b="$(git_current_branch)"
20   git pull --rebase origin "${b:-$1}"
21 }
22 compdef _git ggu=git-pull
23@@ -293,11 +293,11 @@ alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)'
24 alias ggpull='git pull origin "$(git_current_branch)"'
25 
26 function ggl() {
27-  if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
28+  if [[ $# != 0 ]] && [[ $# != 1 ]]; then
29     git pull origin "${*}"
30   else
31     local b
32-    [[ "$#" == 0 ]] && b="$(git_current_branch)"
33+    [[ $# == 0 ]] && b="$(git_current_branch)"
34     git pull origin "${b:-$1}"
35   fi
36 }
37@@ -310,7 +310,7 @@ alias gpd='git push --dry-run'
38 
39 function ggf() {
40   local b
41-  [[ "$#" != 1 ]] && b="$(git_current_branch)"
42+  [[ $# != 1 ]] && b="$(git_current_branch)"
43   git push --force origin "${b:-$1}"
44 }
45 compdef _git ggf=git-push
46@@ -322,7 +322,7 @@ is-at-least 2.30 "$git_version" \
47 
48 function ggfl() {
49   local b
50-  [[ "$#" != 1 ]] && b="$(git_current_branch)"
51+  [[ $# != 1 ]] && b="$(git_current_branch)"
52   git push --force-with-lease origin "${b:-$1}"
53 }
54 compdef _git ggfl=git-push
55@@ -337,11 +337,11 @@ alias gpod='git push origin --delete'
56 alias ggpush='git push origin "$(git_current_branch)"'
57 
58 function ggp() {
59-  if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
60+  if [[ $# != 0 ]] && [[ $# != 1 ]]; then
61     git push origin "${*}"
62   else
63     local b
64-    [[ "$#" == 0 ]] && b="$(git_current_branch)"
65+    [[ $# == 0 ]] && b="$(git_current_branch)"
66     git push origin "${b:-$1}"
67   fi
68 }