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

[TopGit PATCH 2/6] tg-remote: use default remote if non is given

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Oct 3, 2010, 21:25 UTC
Message-ID
<1286141157-30422-2-git-send-email-bert.wesarg@googlemail.com>
In-Reply-To
<1286141157-30422-1-git-send-email-bert.wesarg@googlemail.com>

This is usefull if the remote has new topics and you need to populate the local top-bases.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
 README       |    2 +-
 tg-remote.sh |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/README b/README
index c418ff4..5a54468 100644 README
--- a/README
+++ b/README
@@ -327,7 +327,7 @@ tg remote
 	and 'git push' to operate on them. (Do NOT use 'git push --all'
 	for your pushes - plain 'git push' will do the right thing.)
 
-	It takes a mandatory remote name argument, and optional
+	It takes a optional remote name argument, and optional
 	'--populate' switch - use that for your origin-style remote,
 	it will seed the local topic branch system based on the
 	remote topic branches. '--populate' will also make 'tg remote'
diff --git a/tg-remote.sh b/tg-remote.sh
index 86dcd9a..61774d7 100644 tg-remote.sh
--- a/tg-remote.sh
+++ b/tg-remote.sh
@@ -15,13 +15,16 @@ while [ -n "$1" ]; do
 	--populate)
 		populate=1;;
 	-*)
-		echo "Usage: tg [...] remote [--populate] REMOTE" >&2
+		echo "Usage: tg [...] remote [--populate] [REMOTE]" >&2
 		exit 1;;
 	*)
 		name="$arg";;
 	esac
 done
 
+[ -n "$name" ] ||
+	name="$base_remote"
+
 git config "remote.$name.url" >/dev/null || die "unknown remote '$name'"
 
 
-- 
tg: (29ab4cf..) bw/tg-remote-use-defualt-remote (depends on: master)
Previous: Bert WesargNext: Bert Wesarg
Message 4 of 39 in “planning a new topgit release”
  1. Uwe Kleine-KönigOct 3, 2010
  2. Bert WesargOct 3, 2010
  3. 1/6 Let tg-update take a branch parameterBert Wesarg, Oct 3, 2010
  4. 2/6 tg-remote: use default remote if non is givenBert Wesarg, Oct 3, 2010
  5. 3/6 tg-files: list files changed by the topic branchBert Wesarg, Oct 3, 2010
  6. 4/6 tg-prev/tg-next: commands to explore dependenciesBert Wesarg, Oct 3, 2010
  7. 5/6 put die() messages to stderrBert Wesarg, Oct 3, 2010
  8. 6/6 tg-log: short cut to git logBert Wesarg, Oct 3, 2010
  9. Uwe Kleine-KönigOct 3, 2010
  10. Bert WesargOct 4, 2010
  11. Uwe Kleine-KönigOct 3, 2010
  12. Bert WesargOct 4, 2010
  13. Uwe Kleine-KönigOct 4, 2010
  14. Bert WesargOct 4, 2010
  15. Uwe Kleine-KönigOct 4, 2010
  16. tg-files: list files changed by the topic branchBert Wesarg, Oct 4, 2010
  17. Uwe Kleine-KönigOct 4, 2010
  18. Bert WesargOct 4, 2010
  19. tg-files: list files changed by the topic branchBert Wesarg, Oct 4, 2010
  20. tg-patch: use pretty_treeBert Wesarg, Oct 4, 2010
  21. Bert WesargOct 4, 2010
  22. Uwe Kleine-KönigOct 5, 2010
  23. Bert WesargOct 5, 2010
  24. tg-patch: use pretty_treeBert Wesarg, Oct 5, 2010
  25. Uwe Kleine-KönigOct 5, 2010
  26. Bert WesargOct 5, 2010
  27. Uwe Kleine-KönigOct 5, 2010
  28. tg-files: list files changed by the topic branchBert Wesarg, Oct 5, 2010
  29. Štěpán NěmecOct 5, 2010
  30. Bert WesargOct 6, 2010
  31. Uwe Kleine-KönigOct 3, 2010
  32. Ævar Arnfjörð BjarmasonOct 4, 2010
  33. Uwe Kleine-KönigOct 4, 2010
  34. Uwe Kleine-KönigOct 3, 2010
  35. Bert WesargOct 4, 2010
  36. tg-log: move note from tg base to tg logBert Wesarg, Oct 4, 2010
  37. Štěpán NěmecOct 4, 2010
  38. Bert WesargOct 4, 2010
  39. Uwe Kleine-KönigOct 4, 2010

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.