remote=$(git config "branch.${branch}.remote")
if [[ -n ${remote} ]] ; then
remote=$(git config "remote.${remote}.url")
+ else
+ # Still try harder.
+ local remotes=$(git config --get-regexp 'remote\..*\.url')
+ if [[ -n ${remotes} ]]; then
+ remote=$(echo "${remotes}" | awk '{print $2; exit}')
+ fi
fi
fi
url="https://git.kernel.org/${repo}.git/commit/?id="
;;
*)
- echo "Unknown remote: ${remote}"
+ echo "Unknown remote: '${remote}'"
exit 1
;;
esac