X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tg-remote.sh;fp=tg-remote.sh;h=61774d7a0e28bf0131b1cb1f3851184bb1159c85;hb=c4ee2825ed9676fdf33165f1e1bfc3aff80b2b86;hp=86dcd9a6ca213bfdc57f5122a557b959c8d2cd00;hpb=8d92943bcdb6eea3819dce28d2ff48dd8a061b31;p=topgit.git diff --git a/tg-remote.sh b/tg-remote.sh index 86dcd9a..61774d7 100644 --- a/tg-remote.sh +++ b/tg-remote.sh @@ -15,13 +15,16 @@ while [ -n "$1" ]; do --populate) populate=1;; -*) - echo "Usage: tg [...] remote [--populate] REMOTE" >&2 + echo "Usage: tg [...] remote [--populate] [REMOTE]" >&2 exit 1;; *) name="$arg";; esac done +[ -n "$name" ] || + name="$base_remote" + git config "remote.$name.url" >/dev/null || die "unknown remote '$name'"