Re: [PATCH] topgit tg push feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/  |
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]