* Git public repository naming convention (was: Re: users.txt patch)
[not found] ` <87y7dtt0gk.fsf@rho.meyering.net>
@ 2007-10-24 8:41 ` Benoit SIGOURE
2007-10-24 9:03 ` Git public repository naming convention Andreas Ericsson
0 siblings, 1 reply; 2+ messages in thread
From: Benoit SIGOURE @ 2007-10-24 8:41 UTC (permalink / raw
To: Jim Meyering; +Cc: bug-gnulib, git list
[-- Attachment #1: Type: text/plain, Size: 3029 bytes --]
[CC: Git-ML]
On Oct 24, 2007, at 9:51 AM, Jim Meyering wrote:
> Benoit SIGOURE <tsuna@lrde.epita.fr> wrote:
>>> On Oct 24, 2007, at 12:28 AM, Paul Eggert wrote:
>>>> Index: gnulib.html
>>>> ===================================================================
>>>> RCS file: /web/gnulib/gnulib/gnulib.html,v
>>>> retrieving revision 1.13
>>>> retrieving revision 1.16
>>>> diff -p -u -r1.13 -r1.16
>>>> --- gnulib.html 22 Oct 2007 21:41:43 -0000 1.13
>>>> +++ gnulib.html 23 Oct 2007 22:22:18 -0000 1.16
>>>> @@ -57,14 +57,20 @@ You can also view the <a href="MODULES.h
>>>> anonymous <a href='http://git.or.cz/'>Git</a>, using the following
>>>> shell command:</p>
>>>>
>>>> -<pre><samp>git clone git://git.savannah.gnu.org/gnulib.git
>>>> +<pre><samp>git clone git://git.savannah.gnu.org/gnulib
>>>> </samp></pre>
>>
>> Is there any reason why this has changed? I learned (the hard way)
>> that for bare public repositories, it's better to stick to what turns
>> out to be more than a naming convention of `project.git'. I don't
>
> What are the consequences of not doing that?
You can't git-clone the remote repo because it tries to fetch the
wrong URL (if the url isn't of the form `foo.git' it will try to
fetch `foo/.git' which will fail).
>> know if these issues are only related to dumb protocols (HTTP*) or if
>> they also affect the Git protocol. I can't find the relevant thread
>
> Hmm... maybe it's http-specific?
> Things seem to work fine with the git protocol.
Yeah, that's what I wondered.
>> on the Git ML but the thing is that it seems that several tools rely
>> on the fact that a repository name of the form `foo.git' implies that
>> it's a bare repository (and thus it doesn't need to look for a
>> nested
>> .git directory).
>
> It has always worked -- on that server, at least.
> I use that form because I prefer the shorter URL:
>
> git clone git://git.sv.gnu.org/gnulib
>
> In general, if you control the server repo,
> you can simply add a symlink in project.git:
>
> .git -> ..
>
> I suppose that avoids any such problems, but I haven't
> done that on any of the savannah repositories.
Yeah well that's more of a workaround than anything else.
My guess: it works with the Git protocol, probably because git-http-
fetch works differently than whatever tool does the fetch for the
native Git protocol. OTOH, isn't it better to have a consistent
naming? If you look at the gitweb of gnulib [ http://
git.savannah.gnu.org/gitweb/?p=gnulib.git ], it says "URL git://
git.sv.gnu.org/gnulib.git". Oddly enough, whether you add the `.git'
or not doesn't seem to change anything.
The documentation (Documentation/urls.txt) only shows examples of the
form `git://host.xz/path/to/repo.git/'. So do Documentation/core-
tutorial.txt, Documentation/git-clone.txt and Documentation/
repository-layout.txt (among others).
Maybe the Git gurus will be able to shed some light on this issue.
Cheers,
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Git public repository naming convention
2007-10-24 8:41 ` Git public repository naming convention (was: Re: users.txt patch) Benoit SIGOURE
@ 2007-10-24 9:03 ` Andreas Ericsson
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Ericsson @ 2007-10-24 9:03 UTC (permalink / raw
To: Benoit SIGOURE; +Cc: Jim Meyering, bug-gnulib, git list
Benoit SIGOURE wrote:
> [CC: Git-ML]
>
> On Oct 24, 2007, at 9:51 AM, Jim Meyering wrote:
>> Benoit SIGOURE <tsuna@lrde.epita.fr> wrote:
>>>> On Oct 24, 2007, at 12:28 AM, Paul Eggert wrote:
>>>>> Index: gnulib.html
>>>>> ===================================================================
>>>>> RCS file: /web/gnulib/gnulib/gnulib.html,v
>>>>> retrieving revision 1.13
>>>>> retrieving revision 1.16
>>>>> diff -p -u -r1.13 -r1.16
>>>>> --- gnulib.html 22 Oct 2007 21:41:43 -0000 1.13
>>>>> +++ gnulib.html 23 Oct 2007 22:22:18 -0000 1.16
>>>>> @@ -57,14 +57,20 @@ You can also view the <a href="MODULES.h
>>>>> anonymous <a href='http://git.or.cz/'>Git</a>, using the following
>>>>> shell command:</p>
>>>>>
>>>>> -<pre><samp>git clone git://git.savannah.gnu.org/gnulib.git
>>>>> +<pre><samp>git clone git://git.savannah.gnu.org/gnulib
>>>>> </samp></pre>
>>>
>>> Is there any reason why this has changed? I learned (the hard way)
>>> that for bare public repositories, it's better to stick to what turns
>>> out to be more than a naming convention of `project.git'. I don't
>>
>> What are the consequences of not doing that?
>
> You can't git-clone the remote repo because it tries to fetch the wrong
> URL (if the url isn't of the form `foo.git' it will try to fetch
> `foo/.git' which will fail).
>
>>> know if these issues are only related to dumb protocols (HTTP*) or if
>>> they also affect the Git protocol. I can't find the relevant thread
>>
>> Hmm... maybe it's http-specific?
>> Things seem to work fine with the git protocol.
>
> Yeah, that's what I wondered.
>
>>> on the Git ML but the thing is that it seems that several tools rely
>>> on the fact that a repository name of the form `foo.git' implies that
>>> it's a bare repository (and thus it doesn't need to look for a nested
>>> .git directory).
>>
>> It has always worked -- on that server, at least.
>> I use that form because I prefer the shorter URL:
>>
>> git clone git://git.sv.gnu.org/gnulib
>>
>> In general, if you control the server repo,
>> you can simply add a symlink in project.git:
>>
>> .git -> ..
>>
>> I suppose that avoids any such problems, but I haven't
>> done that on any of the savannah repositories.
>
> Yeah well that's more of a workaround than anything else.
>
> My guess: it works with the Git protocol, probably because
> git-http-fetch works differently than whatever tool does the fetch for
> the native Git protocol. OTOH, isn't it better to have a consistent
> naming? If you look at the gitweb of gnulib [
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git ], it says "URL
> git://git.sv.gnu.org/gnulib.git". Oddly enough, whether you add the
> `.git' or not doesn't seem to change anything.
>
> The documentation (Documentation/urls.txt) only shows examples of the
> form `git://host.xz/path/to/repo.git/'. So do
> Documentation/core-tutorial.txt, Documentation/git-clone.txt and
> Documentation/repository-layout.txt (among others).
>
> Maybe the Git gurus will be able to shed some light on this issue.
>
The dwimmery is handled on the server side and always happens unless
git-upload-pack gets the --strict flag. In git-daemon, this option is
called "--strict-paths".
git clone http://anything means the request doesn't end up in the hands
of git-upload-pack, so the DWIM code in path.c::enter_repo() is never
run.
Letting http-fetch re-implement the same dwimmery, using a trial/error
approach, but saving the correct URL in the remotes config, should
solve this problem, although it will be quite slow on high-latency
networks. Perhaps that doesn't matter, as it should only be an issue
for the original clone.
The suffixes to try are these:
const char *suffix[] = { ".git/.git", "/.git", ".git", "", NULL };
I believe gitweb mimics this behaviour.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-24 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <471E50AA.2020004@gnu.org>
[not found] ` <200710232339.05948.bruno@clisp.org>
[not found] ` <471E6A74.1050402@podval.org>
[not found] ` <loom.20071023T215212-99@post.gmane.org>
[not found] ` <87sl41cvpj.fsf@penguin.cs.ucla.edu>
[not found] ` <86C7B590-6DF9-4785-92CB-B1466641256F@lrde.epita.fr>
[not found] ` <87y7dtt0gk.fsf@rho.meyering.net>
2007-10-24 8:41 ` Git public repository naming convention (was: Re: users.txt patch) Benoit SIGOURE
2007-10-24 9:03 ` Git public repository naming convention Andreas Ericsson
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).