git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[TopGit PATCH v2 3/3] tg-push: handle non-tgish branches

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
May 27, 2009, 08:17 UTC
Message-ID
<1243412221-2844-1-git-send-email-bert.wesarg@googlemail.com>
In-Reply-To
<1243412195-29841-1-git-send-email-bert.wesarg@googlemail.com>
tg push dies if you give 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

Fix this.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
 tg-push.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tg-push.sh b/tg-push.sh
index 8e1b43f..cd208a0 100644
--- a/tg-push.sh
+++ b/tg-push.sh
@@ -67,8 +67,8 @@ for name in $branches; do
 		_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
-- 
tg: (cbca164..) bw/push-fixes-2 (depends on: bw/push-fixes)
Previous: Bert WesargNext: Uwe Kleine-König
Message 3 of 5 in “tg-push: remove useless warning of missing bases for non-tgish branches”
  1. 1/3 tg-push: remove useless warning of missing bases for non-tgish branchesBert Wesarg, May 27, 2009
  2. 2/3 tg-push: prevent multiple occurences of branchesBert Wesarg, May 27, 2009
  3. 3/3 tg-push: handle non-tgish branchesBert Wesarg, May 27, 2009
  4. Uwe Kleine-KönigMay 28, 2009
  5. Uwe Kleine-KönigMay 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.