git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Collins <paul@briny.ondioline.org>
To: git@vger.kernel.org
Subject: git-remote and remotes with '.' in their names
Date: Mon, 26 Feb 2007 20:36:26 +1300	[thread overview]
Message-ID: <87k5y5tlol.fsf@briny.internal.ondioline.org> (raw)

I just switched my remotes over to the git-remote way (which is very
nice!) and was looking for a way to list all of the known remotes.
git-remote with no arguments almost does it, but I get the following:

  [briny(linux-2.6)] git --version
  git version 1.5.0.1
  [briny(linux-2.6)] cat .git/config
  [core]
          repositoryformatversion = 0
          filemode = true

  [user]
          email = "paul@briny.ondioline.org"
  [remote "origin"]
          url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
          fetch = +refs/heads/*:refs/remotes/origin/*
  [remote "wireless-dev"]
          url = git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-dev.git
          fetch = +refs/heads/*:refs/remotes/wireless-dev/*
  [remote "stable-2.6.19"]
          url = git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.19.y.git
          fetch = +refs/heads/*:refs/remotes/stable-2.6.19/*
  [remote "stable-2.6.20"]
          url = git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git
          fetch = +refs/heads/*:refs/remotes/stable-2.6.20/*
  [remote "wireless-2.6"]
          url = git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
          fetch = +refs/heads/*:refs/remotes/wireless-2.6/*
  [briny(linux-2.6)] git-remote
  origin
  stable-2
  wireless-2
  wireless-dev

With this patch I get the correct list, but then it will break if
there are ever config keys like "remote.$remote_name.foo.bar".


--- git-remote~	2007-02-26 01:15:33.000000000 +1300
+++ git-remote	2007-02-26 20:31:20.000000000 +1300
@@ -68,7 +68,7 @@
 		$git->command(qw(config --get-regexp), '^remote\.');
 	};
 	for (@remotes) {
-		if (/^remote\.([^.]*)\.(\S*)\s+(.*)$/) {
+		if (/^remote\.(.*)\.(\S*)\s+(.*)$/) {
 			add_remote_config(\%seen, $1, $2, $3);
 		}
 	}


-- 
Paul Collins
Wellington, New Zealand

Dag vijandelijk luchtschip de huismeester is dood

             reply	other threads:[~2007-02-26  8:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26  7:36 Paul Collins [this message]
2007-02-26 11:28 ` git-remote and remotes with '.' in their names Jakub Narebski
2007-02-26 11:28 ` Johannes Schindelin
2007-02-28 14:55 ` Paolo Bonzini
2007-02-28 15:10   ` Johannes Schindelin
2007-02-28 15:14     ` Paolo Bonzini

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=87k5y5tlol.fsf@briny.internal.ondioline.org \
    --to=paul@briny.ondioline.org \
    --cc=git@vger.kernel.org \
    /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).