{"thread":{"id":"19523","subject":"Re: [TopGit PATCH] tg-push: don't accept non-tgish branches to push","startedAt":"2009-05-26T21:46:22Z","lastAt":"2009-05-27T07:23:59Z","messageCount":2,"participants":["Uwe Kleine-König","Bert Wesarg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"299101","messageId":"1243374382-14828-1-git-send-email-bert.wesarg@googlemail.com","threadId":"19523","inReplyTo":null,"subject":"[TopGit PATCH] tg-push: don't accept non-tgish branches to push","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2009-05-26T21:46:22Z","receivedAt":"2009-05-26T21:46:22Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"tg push dies if you give it a non-tgish branch:\n\n$ tg push -r push-test master\nfatal: Not a valid object name refs/top-bases/master\nfatal: ambiguous argument '^{tree}': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions\nfatal: Not a valid object name master:.topdeps\n\nFix this.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\n---\n tg-push.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/tg-push.sh b/tg-push.sh\nindex c813927..1d7a8a7 100644\n--- a/tg-push.sh\n+++ b/tg-push.sh\n@@ -42,7 +42,8 @@ if [ -z \"$branches\" ]; then\n fi\n \n for name in $branches; do\n-\tref_exists \"$name\" || die \"detached HEAD? Can't push $name\"\n+\tref_exists \"refs/top-bases/$name\" ||\n+\t\tdie \"not a TopGit-controlled branch: $name\"\n done\n \n _listfile=\"$(mktemp -t tg-push-listfile.XXXXXX)\"\n-- \ntg: (8ec0303..) bw/push-fixes-2 (depends on: bw/push-fixes)\n"},{"id":"114779","messageId":"20090527072359.GB13559@pengutronix.de","threadId":"19523","inReplyTo":"1243374382-14828-1-git-send-email-bert.wesarg@googlemail.com","subject":"Re: [TopGit PATCH] tg-push: don't accept non-tgish branches to push","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2009-05-27T07:23:59Z","receivedAt":"2009-05-27T07:23:59Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hi Bert,\n\nOn Tue, May 26, 2009 at 11:46:22PM +0200, Bert Wesarg wrote:\n> tg push dies if you give it a non-tgish branch:\n> \n> $ tg push -r push-test master\n> fatal: Not a valid object name refs/top-bases/master\n> fatal: ambiguous argument '^{tree}': unknown revision or path not in the working tree.\n> Use '--' to separate paths from revisions\n> fatal: Not a valid object name master:.topdeps\n> \n> Fix this.\nWhy not just make it work instead of dying?\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\n"}]}