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

[TopGit PATCH] tg-push: don't accept non-tgish branches to push

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
May 26, 2009, 21:46 UTC
Message-ID
<1243374382-14828-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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tg-push.sh b/tg-push.sh
index c813927..1d7a8a7 100644
--- a/tg-push.sh
+++ b/tg-push.sh
@@ -42,7 +42,8 @@ if [ -z "$branches" ]; then
 fi
 
 for name in $branches; do
-	ref_exists "$name" || die "detached HEAD? Can't push $name"
+	ref_exists "refs/top-bases/$name" ||
+		die "not a TopGit-controlled branch: $name"
 done
 
 _listfile="$(mktemp -t tg-push-listfile.XXXXXX)"
-- 
tg: (8ec0303..) bw/push-fixes-2 (depends on: bw/push-fixes)
Next: Uwe Kleine-König
Message 1 of 2 in “tg-push: don't accept non-tgish branches to push”
  1. tg-push: don't accept non-tgish branches to pushBert Wesarg, May 26, 2009
  2. Uwe Kleine-KönigMay 27, 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.