From: Petr Baudis Date: Tue, 9 Sep 2008 20:02:07 +0000 (+0200) Subject: tg -r REMOTE: Support for switching base remote X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=d55f0210fef0b6b0b1d9edf8cacfcd100901ecd0;ds=sidebyside tg -r REMOTE: Support for switching base remote --- diff --git a/README b/README index 4d96dfb..8299027 100644 --- a/README +++ b/README @@ -460,3 +460,8 @@ carried over to our local base automagically. Then, the base is merged into remote branch and the result is merged to local branch - again, to carry over remote conflict resolutions. In the future, this order might be adjustable per-update in case local changes are diverging more than the remote ones. + +All commands by default refer to the remote that 'tg remote --populate' +was called on the last time ('topgit.remote' configuration variable). You can +manually run any command with a different base remote by passing '-r REMOTE' +_before_ the subcommand name. diff --git a/tg.sh b/tg.sh index b2b9191..2294a99 100644 --- a/tg.sh +++ b/tg.sh @@ -223,7 +223,7 @@ do_help() done echo "TopGit v0.2 - A different patch queue manager" - echo "Usage: tg ($cmds|help) ..." + echo "Usage: tg [-r REMOTE] ($cmds|help) ..." elif [ -r "@sharedir@/tg-$1.txt" ] ; then cat "@sharedir@/tg-$1.txt" else @@ -251,6 +251,10 @@ setup_hook "pre-commit" # this is set by hooks. [ -z "$tg__include" ] || return 0 +if [ "$1" = "-r" ]; then + shift; base_remote="$1"; shift +fi + cmd="$1" [ -n "$cmd" ] || die "He took a duck in the face at two hundred and fifty knots" shift