mirror of
https://github.com/paulirish/git-recent.git
synced 2026-09-10 07:26:16 -04:00
cli: prioritize github detection and avoid false gerrit positives
This commit is contained in:
parent
e1c53c207f
commit
bbbcc0f0f2
|
|
@ -122,10 +122,10 @@ if [[ "$show_links" = true ]]; then
|
|||
GERRIT_SERVER=$(echo "$GERRIT_SERVER" | sed -E 's|https?://||')
|
||||
|
||||
# 2. Try bulk fetchers
|
||||
if command -v git-cl >/dev/null 2>&1 && git cl status --fast --no-branch-color >/dev/null 2>&1; then
|
||||
CL_TYPE="gerrit"
|
||||
elif command -v gh >/dev/null 2>&1 && git remote -v | grep -q "github.com"; then
|
||||
if command -v gh >/dev/null 2>&1 && git remote -v | grep -q "github.com"; then
|
||||
CL_TYPE="github"
|
||||
elif command -v git-cl >/dev/null 2>&1 && [[ "$remote_url" == *.googlesource.com* || -n "$GERRIT_SERVER" ]]; then
|
||||
CL_TYPE="gerrit"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue