diff options
author | Andrew Cady <d@jerkface.net> | 2024-01-19 12:00:30 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2024-01-19 12:01:02 -0500 |
commit | 66a483f0101ec54bd8db0f7d20ed83fe2f615cf4 (patch) | |
tree | e7abd461f3a048d4c9a4e0326eb486929dd4202d /dot/local | |
parent | e9961c6fca69dcc68d13aea90f0989fd5dd39834 (diff) |
git-ll-remote: better default remote
Diffstat (limited to 'dot/local')
-rwxr-xr-x | dot/local/bin/git-ll-remote | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/dot/local/bin/git-ll-remote b/dot/local/bin/git-ll-remote index 28b996f..dd76b78 100755 --- a/dot/local/bin/git-ll-remote +++ b/dot/local/bin/git-ll-remote | |||
@@ -18,7 +18,16 @@ do | |||
18 | esac | 18 | esac |
19 | done | 19 | done |
20 | 20 | ||
21 | remote=${1:-origin} | 21 | remote=${1:-$(git remote)} |
22 | |||
23 | if ! [ "$remote" ] | ||
24 | then | ||
25 | remote=$(git ls-remote --get-url) | ||
26 | if ! [ "$remote" ] | ||
27 | then | ||
28 | exit 1 | ||
29 | fi | ||
30 | fi | ||
22 | 31 | ||
23 | QUIET=y | 32 | QUIET=y |
24 | SHOW=all | 33 | SHOW=all |