Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tg-remote: use default remote if none is given

This is useful if the remote has new topics and you need to populate the local
top-bases.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  • Loading branch information...
commit c4ee2825ed9676fdf33165f1e1bfc3aff80b2b86 1 parent 8d92943
@bertwesarg bertwesarg authored Uwe Kleine-König committed
Showing with 5 additions and 2 deletions.
  1. +1 −1  README
  2. +4 −1 tg-remote.sh
View
2  README
@@ -327,7 +327,7 @@ tg remote
and 'git push' to operate on them. (Do NOT use 'git push --all'
for your pushes - plain 'git push' will do the right thing.)
- It takes a mandatory remote name argument, and optional
+ It takes a optional remote name argument, and optional
'--populate' switch - use that for your origin-style remote,
it will seed the local topic branch system based on the
remote topic branches. '--populate' will also make 'tg remote'
View
5 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'"
Please sign in to comment.
Something went wrong with that request. Please try again.