* [PATCH] Add support for # in URLs in git-remote (was: Re: [PATCH] New script: git-changelog.perl - revised)
@ 2007-11-03 15:26 Ronald Landheer-Cieslak
2007-11-03 15:27 ` Johannes Schindelin
0 siblings, 1 reply; 3+ messages in thread
From: Ronald Landheer-Cieslak @ 2007-11-03 15:26 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Andreas Ericsson, git
[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]
The attached patch adds support for # signs in URLs passed to git-remote add.
The suggestion that, in stead of putting a # in the URL I should set
up a new public repository with just the topic branch in it triggers a
reaction of dismay in me: to me, Git is a fast and resource-sparing
SCM and setting up a second repository just for publishing a branch
seems more than awkward to me - it's a waste of space and a waste of
(my) time.
So I've taken a look at the git-remote code and added a small patch to
support # signs in git-remote add URLs
1 files changed, 6 insertions(+), 1 deletions(-)
This makes git-remote add behave as if whatever comes after the # in
the URL was passed as a -t option. Other options are still allowed, so
with # in the URL, nothing else changes
HTH
rlc
On Nov 3, 2007 9:58 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Sat, 3 Nov 2007, Ronald Landheer-Cieslak wrote:
> > On Nov 3, 2007 4:36 AM, Andreas Ericsson <ae@op5.se> wrote:
> > > Ronald Landheer-Cieslak wrote:
> > > >
> > > > This is also available through git at
> > > > git://vlinder.landheer-cieslak.com/git/git.git#topic/git-log-changelog
> > > >
> > >
> > > This mode of specifying a repository + branch was just thoroughly shot
> > > down in a list discussion, and git certainly doesn't grok it. I'd be a
> > > happier fella if you didn't use it.
> > >
> > Is there a canonical way to specify both the location and the branch
> > in one shot, then?
>
> Yes. Create a repository containing only that branch, as "master", and
> point people to that repository.
--
Ronald Landheer-Cieslak
Software Architect
http://www.landheer-cieslak.com/
New White Paper: "Three Good Reasons to Plan Ahead"
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 9aa00ba7096d050bb62e48334a400270afd65735.patch --]
[-- Type: text/x-diff; name=9aa00ba7096d050bb62e48334a400270afd65735.patch, Size: 678 bytes --]
commit 9aa00ba7096d050bb62e48334a400270afd65735
Author: Ronald Landheer-Cieslak <ronald@landheer-cieslak.com>
Date: Sat Nov 3 10:47:00 2007 -0400
Support # in URLs and interpret them as tracking branches
diff --git a/git-remote.perl b/git-remote.perl
index d13e4c1..6b26523 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -271,7 +271,12 @@ sub show_remote {
}
sub add_remote {
- my ($name, $url, $opts) = @_;
+ my ($name, $url_, $opts) = @_;
+
+ my ($url, $branch) = split(/#/, $url_);
+ $opts->{'track'} ||= [];
+ push @{$opts->{'track'}}, $branch if ($branch);
+
if (exists $remote->{$name}) {
print STDERR "remote $name already exists.\n";
exit(1);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add support for # in URLs in git-remote (was: Re: [PATCH] New script: git-changelog.perl - revised)
2007-11-03 15:26 [PATCH] Add support for # in URLs in git-remote (was: Re: [PATCH] New script: git-changelog.perl - revised) Ronald Landheer-Cieslak
@ 2007-11-03 15:27 ` Johannes Schindelin
2007-11-13 23:56 ` Josh Triplett
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2007-11-03 15:27 UTC (permalink / raw)
To: Ronald Landheer-Cieslak; +Cc: Andreas Ericsson, git
Hi,
On Sat, 3 Nov 2007, Ronald Landheer-Cieslak wrote:
> The attached patch adds support for # signs in URLs passed to git-remote
> add.
NACK!
Please be polite enough to read up on the _many_ emails on this list about
this very subject.
Not doing so just _wastes_ our time.
Sorry for being so harsh, but this very subject easily cost me 20 hours in
total(!) in the last few weeks.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add support for # in URLs in git-remote (was: Re: [PATCH] New script: git-changelog.perl - revised)
2007-11-03 15:27 ` Johannes Schindelin
@ 2007-11-13 23:56 ` Josh Triplett
0 siblings, 0 replies; 3+ messages in thread
From: Josh Triplett @ 2007-11-13 23:56 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Ronald Landheer-Cieslak, Andreas Ericsson, git
[-- Attachment #1: Type: text/plain, Size: 853 bytes --]
Johannes Schindelin wrote:
> On Sat, 3 Nov 2007, Ronald Landheer-Cieslak wrote:
>> The attached patch adds support for # signs in URLs passed to git-remote
>> add.
>
> NACK!
>
> Please be polite enough to read up on the _many_ emails on this list about
> this very subject.
>
> Not doing so just _wastes_ our time.
>
> Sorry for being so harsh, but this very subject easily cost me 20 hours in
> total(!) in the last few weeks.
Perhaps this should go in the Git FAQ at
http://git.or.cz/gitwiki/GitFaq . Does your message with Message-ID
<Pine.LNX.4.64.0710162228560.25221@racer.site>, subject "Re:
remote#branch", accurately describe the full problem with using #,
namely that refs can contain #?
Any other problems besides not having the ability to reference more
than one branch with this syntax?
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-13 23:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-03 15:26 [PATCH] Add support for # in URLs in git-remote (was: Re: [PATCH] New script: git-changelog.perl - revised) Ronald Landheer-Cieslak
2007-11-03 15:27 ` Johannes Schindelin
2007-11-13 23:56 ` Josh Triplett
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).