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

Re: [PATCH] topgit tg push feature

From
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date
May 11, 2009, 19:55 UTC
Message-ID
<20090511195532.GA28340@pengutronix.de>
In-Reply-To
<20090511032813.GA15540@gmx.de>
Hi Marc,
just some random nitpicks on top of your patch:
diff --git a/tg-push.sh b/tg-push.sh
index 0fa7854..8897a18 100644
--- a/tg-push.sh
+++ b/tg-push.sh
@@ -8,7 +8,7 @@ remotes=
 
 recurse_deps=true
 tgish_deps_only=false
-dry_run=false
+dry_run=
 
 while [ -n "$1" ]; do
 	arg="$1"; shift
@@ -16,11 +16,11 @@ while [ -n "$1" ]; do
 	--no-deps)
 		recurse_deps=false;;
 	--dry-run)
-		dry_run=true;;
+		dry_run="--dry-run";;
 	--tgish-only)
 		tgish_deps_only=true;;
 	-h|--help)
-		echo "Usage: tg push [(--dry-run | --no-deps | --tgish-only)] [-r "remote remote2"]* branch*"
+		echo "Usage: tg push [--dry-run] [--no-deps] [--tgish-only] [-r "remote remote2"]* branch*"
 		exit 1;;
 	-r)
 		remotes="$remotes $1"
@@ -44,12 +44,12 @@ if [ -z "$branches" ]; then
 fi
 
 for name in $branches; do
-	ref_exists "$name" || die "detached HEAD? Can't push that"
+	ref_exists "$name" || die "detached HEAD? Can't push $name"
 done
 
 push_branch(){
 	# if so desired omit non tgish deps
-	 $tgish_deps_only && [ -z "$_dep_is_tgish" ] && return 0
+	$tgish_deps_only && [ -z "$_dep_is_tgish" ] && return 0
 
 	echo "$_dep"
 	local base="top-bases/$_dep"
@@ -73,10 +73,6 @@ for remote in $remotes; do
 			push_branch "$name"
 		)"
 		echo "pushing:"; echo $list
-		if $dry_run; then
-			echo git push $remote $list
-		else
-			git push $remote $list
-		fi
+		git push $dry_run "$remote" $list
 	done
 done
-- 
1.6.2.4

It's untested, but I think it should be enough if it is eyeballed by
someone else.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Previous: martin f krafftNext: Marc Weber
Message 13 of 22 in “topgit tg push feature”
  1. topgit tg push featureMarc Weber, Apr 25, 2009
  2. Marc WeberApr 25, 2009
  3. Marc WeberMay 5, 2009
  4. Marc WeberMay 7, 2009
  5. Bert WesargMay 7, 2009
  6. Uwe Kleine-KönigMay 7, 2009
  7. Bert WesargMay 7, 2009
  8. martin f krafftMay 9, 2009
  9. Marc WeberMay 9, 2009
  10. Marc WeberMay 11, 2009
  11. martin f krafftMay 11, 2009
  12. martin f krafftMay 11, 2009
  13. Uwe Kleine-KönigMay 11, 2009
  14. Marc WeberMay 11, 2009
  15. martin f krafftMay 11, 2009
  16. Uwe Kleine-KönigMay 12, 2009
  17. Bert WesargMay 12, 2009
  18. Marc WeberMay 12, 2009
  19. Bert WesargMay 12, 2009
  20. Uwe Kleine-KönigMay 12, 2009
  21. tg-remote: don't add push specs but warn about existing ones.Uwe Kleine-König, May 13, 2009
  22. martin f krafftMay 13, 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.