diff options
Diffstat (limited to 'dot/local/bin')
-rwxr-xr-x | dot/local/bin/git-ll-remote | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/dot/local/bin/git-ll-remote b/dot/local/bin/git-ll-remote index 87db85d..c9beb63 100755 --- a/dot/local/bin/git-ll-remote +++ b/dot/local/bin/git-ll-remote | |||
@@ -20,9 +20,14 @@ done | |||
20 | 20 | ||
21 | remote=${1:-origin} | 21 | remote=${1:-origin} |
22 | 22 | ||
23 | have_ref() | 23 | SHOW=ahead |
24 | [ "$OPT_a" ] && SHOW=all | ||
25 | [ "$OPT_r" ] && SHOW=behind | ||
26 | [ "$OPT_u" ] && SHOW=upto | ||
27 | |||
28 | show_message() | ||
24 | { | 29 | { |
25 | git rev-list --quiet "$1" 2>/dev/null | 30 | show_${SHOW}_message |
26 | } | 31 | } |
27 | 32 | ||
28 | show_all_message() | 33 | show_all_message() |
@@ -94,14 +99,9 @@ EOF | |||
94 | printf "$x\n" "$1" >&2 | 99 | printf "$x\n" "$1" >&2 |
95 | } | 100 | } |
96 | 101 | ||
97 | SHOW=ahead | 102 | have_ref() |
98 | [ "$OPT_a" ] && SHOW=all | ||
99 | [ "$OPT_r" ] && SHOW=behind | ||
100 | [ "$OPT_u" ] && SHOW=upto | ||
101 | |||
102 | show_message() | ||
103 | { | 103 | { |
104 | show_${SHOW}_message | 104 | git rev-list --quiet "$1" 2>/dev/null |
105 | } | 105 | } |
106 | 106 | ||
107 | git_fetch() | 107 | git_fetch() |