chiark / gitweb /
tg-push: handle non-tgish branches
authorBert Wesarg <bert.wesarg@googlemail.com>
Wed, 27 May 2009 08:17:01 +0000 (10:17 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 28 May 2009 08:30:06 +0000 (10:30 +0200)
tg push died if you gave it a non-tgish branch:

$ tg push -r push-test master
fatal: Not a valid object name refs/top-bases/master
fatal: ambiguous argument '^{tree}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
fatal: Not a valid object name master:.topdeps

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
tg-push.sh

index 8e1b43fdea767f1c2a3e1b90ebfc2ed4343bdbbe..cd208a06413878de19fde4eb166717158a44c4e6 100644 (file)
@@ -67,8 +67,8 @@ for name in $branches; do
                _dep_is_tgish=
        push_branch "$name"
 
                _dep_is_tgish=
        push_branch "$name"
 
-       # deps
-       $recurse_deps &&
+       # deps but only if branch is tgish
+       $recurse_deps && [ -n "$_dep_is_tgish" ] &&
                no_remotes=1 recurse_deps push_branch "$name"
 
        # remove multiple occurrences of the same branch
                no_remotes=1 recurse_deps push_branch "$name"
 
        # remove multiple occurrences of the same branch