| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c81123b commit c5128ca
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,17 +23,18 @@ instance_name() { | |||
| 23 | 23 | grep -B 5 "^\s*url\s*=\s*http\(s\)*://$host" ~/.python-gitlab.cfg | grep "^\[" | tail -n 1 | sed -e 's#\[\(.\+\)\]#\1#' | |
| 24 | 24 | } | |
| 25 | 25 | ||
| 26 | - if [ "x$1" = "x--git-remote" ]; then | ||
| 26 | + remote=$(git config --local gitlab.remote) | ||
| 27 | + [ -n "$remote" ] || remote=$(git remote) | ||
| 28 | + if [ "x$1" = "x--remote" ]; then | ||
| 27 | 29 | remote=$2 | |
| 28 | 30 | shift 2 | |
| 29 | 31 | fi | |
| 30 | - [ -n "$remote" ] || remote=$(git remote) | ||
| 31 | 32 | if [ -z "$remote" ]; then | |
| 32 | 33 | echo "No remotes found in repository" | |
| 33 | 34 | exit 1 | |
| 34 | 35 | fi | |
| 35 | 36 | if [ $(echo $remote | wc -w) -gt 1 ]; then | |
| 36 | - echo "Multiple remotes found, specify a remote using --git-remote REMOTE" | ||
| 37 | + echo "Multiple remotes found, specify a remote using --remote REMOTE" | ||
| 37 | 38 | exit 1 | |
| 38 | 39 | fi | |
| 39 | 40 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | # TODO: | |
| 4 | 4 | # check args for cfg file | |
| 5 | - if [ "x$1" = "x--git-remote" ]; then | ||
| 5 | + if [ "x$1" = "x--remote" ]; then | ||
| 6 | 6 | git_repo="$1 $2" | |
| 7 | 7 | shift 2 | |
| 8 | 8 | fi | |
| Back | FazBrowse Home | New Git URL |
0 commit comments