git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Alex Riesen" <raa.lkml@gmail.com>
Cc: SLONIK.AZ@gmail.com, "Andreas Ericsson" <ae@op5.se>, git@vger.kernel.org
Subject: Re: [PATCH] git-fetch should not strip off ".git" extension
Date: Tue, 21 Oct 2008 15:36:40 -0700	[thread overview]
Message-ID: <7vd4htwp6v.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <81b0412b0810211506y400ba750k2613ba19f01fb57@mail.gmail.com> (Alex Riesen's message of "Wed, 22 Oct 2008 00:06:55 +0200")

"Alex Riesen" <raa.lkml@gmail.com> writes:

> 2008/10/21 Junio C Hamano <gitster@pobox.com>:
>> "Leo Razoumov" <slonik.az@gmail.com> writes:
>>
>>> Even though the old behavior is "long established", it introduces
>>> unnecessary ambiguity. If I have two repos
>>> ...
>>
>> Of course.  Now you know why people don't name such a pair of repositories
>> like that ;-).
>
> FWIW, I support Leo on that. The "established" behavior is stupid.

I am not inclined to respond to such an emotional argument.  On the other
hand, it is fair to say that the existing behaviour is established,
because it is backed by a long history, which you can objectively verify.

If you think about it deeper, you will realize that it is not even clear
if it is "stupid".

More importantly, the behaviour is consistent with the way how "git fetch"
and "git clone" DWIMs the repository name by suffixing .git when the input
lacks it.  And this DWIMmery comes from the expectations that:

 (1) people name their repository project.git; and

 (2) people like using and seeing short names (iow, "clone
     git://$somewhere/project" is preferred over "clone
     git://$somewhere/project.git");

If a repository whose real location is git://$somewhere/project.git is
cloned/fetched as git://$somewhere/project by people, recording the merge
source using the shorter name used by people to fetch from it is more
consistent.  The patch breaks this consistency [*1*].

What is clear is that you would confuse yourself if you have two
repositories A and A.git next to each other, and that is primarily because
it breaks the above expectation.

git core-level rarely imposes such policies, but what Porcelains do is a
different matter.

Hence the suggestion: don't do it.

[Footnote]

*1* It would be a different matter if the patch at the same time removed
the fetch/clone DWIMmery.  At least such a patch would be internally self
consistent.

  reply	other threads:[~2008-10-21 22:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-18 11:59 [PATCH] git-fetch should not strip off ".git" extension Leo Razoumov
2008-10-20 10:36 ` Andreas Ericsson
2008-10-20 15:08   ` Leo Razoumov
2008-10-20 18:37   ` Junio C Hamano
2008-10-21 10:23     ` Leo Razoumov
2008-10-21 16:56       ` Junio C Hamano
2008-10-21 22:06         ` Alex Riesen
2008-10-21 22:36           ` Junio C Hamano [this message]
2008-10-21 22:43             ` Alex Riesen
2008-10-22  7:55               ` Andreas Ericsson
2008-10-21 23:35             ` Junio C Hamano
2008-10-22 11:35             ` Leo Razoumov
2008-10-22 11:50             ` Leo Razoumov

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=7vd4htwp6v.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=SLONIK.AZ@gmail.com \
    --cc=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /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).