[PATCH] tg-remote: don't add push specs but warn about existing ones.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: =?utf-8?q?Uwe=20Kleine-K=C3=B6nig?=
Date: Wednesday, May 13, 2009 - 3:04 am

topgit used to add some push specs to assert that topbases are pushed,
too.  This should now be handled by tg-push.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Marc Weber <marco-oweber@gmx.de>
Cc: martin f. krafft <madduck@debian.org>
Cc: 528442@bugs.debian.org
---
 tg-remote.sh |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tg-remote.sh b/tg-remote.sh
index 3a40081..86dcd9a 100644
--- a/tg-remote.sh
+++ b/tg-remote.sh
@@ -28,8 +28,13 @@ git config "remote.$name.url" >/dev/null || die "unknown remote '$name'"
 ## Configure the remote
 
 git config --replace-all "remote.$name.fetch" "+refs/top-bases/*:refs/remotes/$name/top-bases/*" "\\+refs/top-bases/\\*:refs/remotes/$name/top-bases/\\*"
-git config --replace-all "remote.$name.push" "+refs/top-bases/*:refs/top-bases/*" "\\+refs/top-bases/\\*:refs/top-bases/\\*"
-git config --replace-all "remote.$name.push" "+refs/heads/*:refs/heads/*" "\\+refs/heads/\\*:refs/heads/\\*"
+
+if git config --get-all "remote.$name.push" "\\+refs/top-bases/\\*:refs/top-bases/\\*" >/dev/null && test "xtrue" != "x$(git config --bool --get topgit.dontwarnonoldpushspecs)"; then
+	info "Probably you want to remove the push specs introduced by an old version of topgit:"
+	info '       git config --unset-all "remote.'$name'.push" "\\+refs/top-bases/\\*:refs/top-bases/\\*"'
+	info '       git config --unset-all "remote.'$name'.push" "\\+refs/heads/\\*:refs/heads/\\*"'
+	info '(or use git config --bool --add topgit.dontwarnonoldpushspecs true to get rid of this warning)'
+fi
 
 info "Remote $name can now follow TopGit topic branches."
 if [ -z "$populate" ]; then
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] topgit tg push feature, Marc Weber, (Sat Apr 25, 9:13 am)
Re: [PATCH] topgit tg push feature, Marc Weber, (Sat Apr 25, 9:34 am)
Re: [PATCH] topgit tg push feature, Marc Weber, (Tue May 5, 2:34 am)
Re: [PATCH] topgit tg push feature, Marc Weber, (Wed May 6, 9:59 pm)
Re: [PATCH] topgit tg push feature, Bert Wesarg, (Wed May 6, 10:45 pm)
Re: [PATCH] topgit tg push feature, Uwe =?iso-8859-1?Q?K ..., (Thu May 7, 1:43 am)
Re: [PATCH] topgit tg push feature, Bert Wesarg, (Thu May 7, 2:50 am)
Re: [PATCH] topgit tg push feature, martin f krafft, (Sat May 9, 3:36 am)
Re: [PATCH] topgit tg push feature, Marc Weber, (Sat May 9, 12:09 pm)
Re: [PATCH] topgit tg push feature, Marc Weber, (Sun May 10, 8:28 pm)
Re: [PATCH] topgit tg push feature, martin f krafft, (Mon May 11, 12:25 am)
Re: [PATCH] topgit tg push feature, martin f krafft, (Mon May 11, 12:47 am)
Re: [PATCH] topgit tg push feature, Uwe =?iso-8859-1?Q?K ..., (Mon May 11, 12:55 pm)
Re: [PATCH] topgit tg push feature, Marc Weber, (Mon May 11, 2:06 pm)
Re: [PATCH] topgit tg push feature, martin f krafft, (Mon May 11, 2:39 pm)
Re: [PATCH] topgit tg push feature, Uwe =?iso-8859-1?Q?K ..., (Mon May 11, 10:13 pm)
Re: [PATCH] topgit tg push feature, Bert Wesarg, (Mon May 11, 11:22 pm)
Re: [PATCH] topgit tg push feature, Marc Weber, (Tue May 12, 12:54 am)
Re: [PATCH] topgit tg push feature, Bert Wesarg, (Tue May 12, 1:55 am)
Re: [PATCH] topgit tg push feature, Uwe =?iso-8859-1?Q?K ..., (Tue May 12, 2:02 am)
[PATCH] tg-remote: don't add push specs but warn about exi ..., =?utf-8?q?Uwe=20Klei ..., (Wed May 13, 3:04 am)