From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: git@vger.kernel.org
Cc: "martin f. krafft" <madduck@debian.org>, Petr Baudis <pasky@ucw.cz>
Subject: [PATCH] [TOPGIT] make tg remote idempotent
Date: Wed, 14 Jan 2009 22:27:22 +0100 [thread overview]
Message-ID: <1231968443-13960-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
Before this patch each call to tg remote added three config entries
no matter if they already existed. After some time my .git/config was
crowded.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
tg-remote.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tg-remote.sh b/tg-remote.sh
index c3e8bd3..7f7a1b0 100644
--- a/tg-remote.sh
+++ b/tg-remote.sh
@@ -27,9 +27,9 @@ git config "remote.$name.url" >/dev/null || die "unknown remote '$name'"
## Configure the remote
-git config --add "remote.$name.fetch" "+refs/top-bases/*:refs/remotes/$name/top-bases/*"
-git config --add "remote.$name.push" "+refs/top-bases/*:refs/top-bases/*"
-git config --add "remote.$name.push" "+refs/heads/*:refs/heads/*"
+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/*"
info "Remote $name can now follow TopGit topic branches."
if [ -z "$populate" ]; then
--
1.5.6.5
next reply other threads:[~2009-01-14 21:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 21:27 Uwe Kleine-König [this message]
2009-01-14 21:27 ` [PATCH] [TOPGIT] make creating a commit from a topgit branch a function Uwe Kleine-König
2009-01-21 3:19 ` martin f krafft
2009-01-21 10:16 ` Uwe Kleine-König
2009-01-22 0:13 ` martin f krafft
2009-01-21 11:06 ` [PATCH] [TOPGIT] make tg remote idempotent Uwe Kleine-König
2009-01-21 14:31 ` martin f krafft
-- strict thread matches above, loose matches on Subject: below --
2009-02-25 19:58 topgit patches Uwe Kleine-König
2009-02-25 20:03 ` [PATCH] [TOPGIT] limit rev-list in branch_contains to a single rev Uwe Kleine-König
2009-02-25 20:03 ` [PATCH] [TOPGIT] allow working with annihilated branches Uwe Kleine-König
2009-02-25 20:03 ` [PATCH] [TOPGIT] make tg remote idempotent Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1231968443-13960-1-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=git@vger.kernel.org \
--cc=madduck@debian.org \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).