* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 12:18 ` Petr Baudis
@ 2005-11-15 14:24 ` Johannes Schindelin
2005-11-15 15:37 ` Adrien Beau
2005-11-15 16:50 ` Pavel Roskin
2005-11-15 17:05 ` Junio C Hamano
` (2 subsequent siblings)
3 siblings, 2 replies; 24+ messages in thread
From: Johannes Schindelin @ 2005-11-15 14:24 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, Pavel Roskin, git
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1796 bytes --]
Hi,
On Tue, 15 Nov 2005, Petr Baudis wrote:
> Dear diary, on Tue, Nov 15, 2005 at 12:09:42PM CET, I got a letter
> where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> > I think Junio is right: we should not force everybody not to use
> > symlinks, only because there happens to be VFAT-, SMB- or HTTP-shared
> > repositories. As Junio says, if there are people experiencing problems
> > because they lack symbolic links, they should fix it.
>
> I'm ambivalent here. I would like to have just a single behaviour here,
> since the symbolic ref otherwise really does not get much testing. But I
> can also understand that we are breaking tools here.
>
> Still, for the reason above, I think we should aim at the symbolic refs
> being the canonical format in the next major release after 1.0, giving
> users time to fix their tools. I can see no advantage in symlinks except
> the backwards compatibility - speed argument was presented, but I don't
> buy that until I see hard data supporting that.
<yousortofaskedforit>
Well, I can see no good reason for symrefs, except for backwards
compatibility! Modern systems do support symlinks, you know?
Let´s face it. The main target for git is not Windows users. If we really
want to support all idiocies of all possible ones, how about this one:
If I clone a repository to a USB stick on cygwin, and try to access it
from my iBook, it does not work, because for *backward compatibility*
reasons, files fitting the 8.3 format are stored in UPPER CASE.
So, I would like to have support for UPPER CASE files in .git, please? And
since I cannot do my own testing, please could you force everybody´s git
to write OBJECTS and MASTER in UPPER CASE?
</yousortofaskedforit>
Ciao,
Dscho
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 14:24 ` Johannes Schindelin
@ 2005-11-15 15:37 ` Adrien Beau
2005-11-15 16:50 ` Pavel Roskin
1 sibling, 0 replies; 24+ messages in thread
From: Adrien Beau @ 2005-11-15 15:37 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
> Well, I can see no good reason for symrefs, except for backwards
> compatibility! Modern systems do support symlinks, you know?
What about less modern systems? I like to have tools that work on those, too.
> Let´s face it. The main target for git is not Windows users.
Yes, but they are a worthy secondary target.
> If we really want to support all idiocies of all possible ones,
I don't think we want that, but I don't think the symref vs. symlink
issue is an idiocy either.
> how about this one:
>
> If I clone a repository to a USB stick on cygwin, and try to access it
> from my iBook, it does not work, because for *backward compatibility*
> reasons, files fitting the 8.3 format are stored in UPPER CASE.
>
> So, I would like to have support for UPPER CASE files in .git, please? And
> since I cannot do my own testing, please could you force everybody´s git
> to write OBJECTS and MASTER in UPPER CASE?
Long and mixed-case filenames are supported almost universally. Why
aren't you using FAT32 on your USB key? Even that decade-old
filesystem supports them.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 14:24 ` Johannes Schindelin
2005-11-15 15:37 ` Adrien Beau
@ 2005-11-15 16:50 ` Pavel Roskin
1 sibling, 0 replies; 24+ messages in thread
From: Pavel Roskin @ 2005-11-15 16:50 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Petr Baudis, Junio C Hamano, git
On Tue, 2005-11-15 at 15:24 +0100, Johannes Schindelin wrote:
> <yousortofaskedforit>
> Well, I can see no good reason for symrefs, except for backwards
> compatibility! Modern systems do support symlinks, you know?
You misunderstood me here. I meant backward compatibility with git
wrappers, not with old operating systems.
I meant, the only reason we don't want symrefs to be used by default is
because there are wrappers around git that only work with symlinks. So,
if we change the default behavior in git now, those wrappers will break
on new repositories.
> Let´s face it. The main target for git is not Windows users. If we really
> want to support all idiocies of all possible ones, how about this one:
>
> If I clone a repository to a USB stick on cygwin, and try to access it
> from my iBook, it does not work, because for *backward compatibility*
> reasons, files fitting the 8.3 format are stored in UPPER CASE.
>
> So, I would like to have support for UPPER CASE files in .git, please? And
> since I cannot do my own testing, please could you force everybody´s git
> to write OBJECTS and MASTER in UPPER CASE?
That was pretty funny :-)
Actually, what's different about symlinks is that they go beyond the
paradigm of one data stream per file. There are two data streams
accessible through the symlink, one being the data in the file it points
to, and the other being the path to that file.
This doesn't map well to many data transfer protocols. We don't want
git to work only over protocols that have explicit support for symlinks.
One example is http, sometimes the only protocol allowed to transcend
corporate firewalls.
Another, more controversial example is CVS. Sourceforge doesn't support
git, but I could store my git database in Sourceforge CVS, and thus
share it with other contributors. Not being able to put .git/HEAD there
would be an annoyance.
I believe Cygwin developers were actually more concerned about symlinks
damaged by SMB than about any issues with storing them locally. After
all, Cygwin is quite good at emulating POSIX, including symlinks.
Returning to your example, 8.3 format is a problem with storage. Those
are behind us. It's problems with transfer that are going to limit us.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 12:18 ` Petr Baudis
2005-11-15 14:24 ` Johannes Schindelin
@ 2005-11-15 17:05 ` Junio C Hamano
2005-11-15 17:21 ` Pavel Roskin
2005-11-15 17:06 ` Pavel Roskin
2005-11-16 1:05 ` Josef Weidendorfer
3 siblings, 1 reply; 24+ messages in thread
From: Junio C Hamano @ 2005-11-15 17:05 UTC (permalink / raw)
To: Petr Baudis; +Cc: Johannes Schindelin, Pavel Roskin, git
Petr Baudis <pasky@suse.cz> writes:
> Yes, I would very much like to have this. I still want to go
> symrefs-only for public repositories created for cg-admin-setuprepo, so
> that fetching over HTTP works properly.
Sorry, I must have missed that part. How does fetch-over-HTTP
break with symlinked HEAD?
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 17:05 ` Junio C Hamano
@ 2005-11-15 17:21 ` Pavel Roskin
2005-11-15 17:32 ` Nick Hengeveld
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: Pavel Roskin @ 2005-11-15 17:21 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Petr Baudis, Johannes Schindelin, git
On Tue, 2005-11-15 at 09:05 -0800, Junio C Hamano wrote:
> Petr Baudis <pasky@suse.cz> writes:
>
> > Yes, I would very much like to have this. I still want to go
> > symrefs-only for public repositories created for cg-admin-setuprepo, so
> > that fetching over HTTP works properly.
>
> Sorry, I must have missed that part. How does fetch-over-HTTP
> break with symlinked HEAD?
With symlinks, cogito doesn't know which branch it is fetching if the
branch is not explicitly specified.
The old behavior was to fetch the "master" branch by default.
Currently, cogito uses HEAD, but it cannot read the symlink, it can only
read the SHA1. So, if somebody decides to use "cg-switch" on the public
repository (admittedly not a very good idea), all the clients that are
not using an explicit branch will unknowingly switch to another branch
upon update.
It also could be useful for users to know the branch name. I, for one,
would like to know if HEAD links to "stable" or "sandbox4crazyhacks",
even if both have the same SHA1 at the moment.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 17:21 ` Pavel Roskin
@ 2005-11-15 17:32 ` Nick Hengeveld
2005-11-15 17:33 ` Linus Torvalds
2005-11-15 18:13 ` Junio C Hamano
2 siblings, 0 replies; 24+ messages in thread
From: Nick Hengeveld @ 2005-11-15 17:32 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Junio C Hamano, Petr Baudis, Johannes Schindelin, git
On Tue, Nov 15, 2005 at 12:21:35PM -0500, Pavel Roskin wrote:
> > Sorry, I must have missed that part. How does fetch-over-HTTP
> > break with symlinked HEAD?
Symlinks can also be problematic for push-over-HTTP, since there are no
guarantees about the backend on the server (eg. pushing into a
subversion repo with mod_dav_svn.)
--
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 17:21 ` Pavel Roskin
2005-11-15 17:32 ` Nick Hengeveld
@ 2005-11-15 17:33 ` Linus Torvalds
2005-11-15 17:42 ` Petr Baudis
2005-11-15 18:13 ` Junio C Hamano
2 siblings, 1 reply; 24+ messages in thread
From: Linus Torvalds @ 2005-11-15 17:33 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Junio C Hamano, Petr Baudis, Johannes Schindelin, git
On Tue, 15 Nov 2005, Pavel Roskin wrote:
>
> With symlinks, cogito doesn't know which branch it is fetching if the
> branch is not explicitly specified.
>
> The old behavior was to fetch the "master" branch by default.
> Currently, cogito uses HEAD, but it cannot read the symlink, it can only
> read the SHA1.
Hmm? Why not just use "git-symbolic-ref HEAD" to figure it out? That works
with both symlinks and symrefs (and indeed, was added for that reason).
Linus
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 17:33 ` Linus Torvalds
@ 2005-11-15 17:42 ` Petr Baudis
2005-11-15 18:01 ` Linus Torvalds
0 siblings, 1 reply; 24+ messages in thread
From: Petr Baudis @ 2005-11-15 17:42 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Pavel Roskin, Junio C Hamano, Johannes Schindelin, git
Dear diary, on Tue, Nov 15, 2005 at 06:33:44PM CET, I got a letter
where Linus Torvalds <torvalds@osdl.org> said that...
> On Tue, 15 Nov 2005, Pavel Roskin wrote:
> >
> > With symlinks, cogito doesn't know which branch it is fetching if the
> > branch is not explicitly specified.
> >
> > The old behavior was to fetch the "master" branch by default.
> > Currently, cogito uses HEAD, but it cannot read the symlink, it can only
> > read the SHA1.
>
> Hmm? Why not just use "git-symbolic-ref HEAD" to figure it out? That works
> with both symlinks and symrefs (and indeed, was added for that reason).
If you show me a way how to do git-symbolic-ref over HTTP, I will be
most grateful. :-)
Seriously though, if people have huge problem with having symbolic refs
by default, that's unfortunate since we have two possibilities which are
not equally tested, but I can live with it - just give me a way to
configure that behaviour per-repository, so that I can make GIT use
symbolic refs in public repositories (or I can whip up a patch myself at
the evening, after all...).
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 17:42 ` Petr Baudis
@ 2005-11-15 18:01 ` Linus Torvalds
0 siblings, 0 replies; 24+ messages in thread
From: Linus Torvalds @ 2005-11-15 18:01 UTC (permalink / raw)
To: Petr Baudis; +Cc: Pavel Roskin, Junio C Hamano, Johannes Schindelin, git
On Tue, 15 Nov 2005, Petr Baudis wrote:
>
> If you show me a way how to do git-symbolic-ref over HTTP, I will be
> most grateful. :-)
Hmm, why do you care?
If you do a fetch over http, you'd just fetch HEAD directly. If that's
just a SHA1 (like it will be with a symlink) you'll just use that as the
branch (and don't care about what branch it was). And if it's a symref,
you can see what the branch should be and fetch that. No?
Linus
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 17:21 ` Pavel Roskin
2005-11-15 17:32 ` Nick Hengeveld
2005-11-15 17:33 ` Linus Torvalds
@ 2005-11-15 18:13 ` Junio C Hamano
2 siblings, 0 replies; 24+ messages in thread
From: Junio C Hamano @ 2005-11-15 18:13 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Petr Baudis, Johannes Schindelin, git
Pavel Roskin <proski@gnu.org> writes:
> On Tue, 2005-11-15 at 09:05 -0800, Junio C Hamano wrote:
>> Petr Baudis <pasky@suse.cz> writes:
>>
>> > Yes, I would very much like to have this. I still want to go
>> > symrefs-only for public repositories created for cg-admin-setuprepo, so
>> > that fetching over HTTP works properly.
>>
>> Sorry, I must have missed that part. How does fetch-over-HTTP
>> break with symlinked HEAD?
>
> With symlinks, cogito doesn't know which branch it is fetching if the
> branch is not explicitly specified.
Ah, thanks.
git-clone-pack has the same problem. It basically "guesses" by:
- If the master branch exists, and the object name of
the branch tip matches the object name of HEAD, assume
HEAD points at master. Even when there are other
branches that happen to share the same branch head.
- Otherwise, if there is a branch whose tip matches the
object name of HEAD, assume HEAD points at it. It
just picks "one-of-them" if more than one branches
match.
- If there is no branch that matches HEAD, issue a
warning and create HEAD that records the object name,
not pointing anywhere.
To solve this generally we would need to extend what ls-remote
returns, I suppose.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 12:18 ` Petr Baudis
2005-11-15 14:24 ` Johannes Schindelin
2005-11-15 17:05 ` Junio C Hamano
@ 2005-11-15 17:06 ` Pavel Roskin
2005-11-15 18:21 ` Junio C Hamano
2005-11-16 1:05 ` Josef Weidendorfer
3 siblings, 1 reply; 24+ messages in thread
From: Pavel Roskin @ 2005-11-15 17:06 UTC (permalink / raw)
To: Petr Baudis; +Cc: Johannes Schindelin, Junio C Hamano, git
On Tue, 2005-11-15 at 13:18 +0100, Petr Baudis wrote:
> Dear diary, on Tue, Nov 15, 2005 at 12:09:42PM CET, I got a letter
> where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> > I think Junio is right: we should not force everybody not to use symlinks,
> > only because there happens to be VFAT-, SMB- or HTTP-shared repositories.
> > As Junio says, if there are people experiencing problems because they lack
> > symbolic links, they should fix it.
>
> I'm ambivalent here. I would like to have just a single behaviour here,
> since the symbolic ref otherwise really does not get much testing. But I
> can also understand that we are breaking tools here.
>
> Still, for the reason above, I think we should aim at the symbolic refs
> being the canonical format in the next major release after 1.0, giving
> users time to fix their tools. I can see no advantage in symlinks except
> the backwards compatibility - speed argument was presented, but I don't
> buy that until I see hard data supporting that.
I planned to write about symrefs long ago, and probably I waited for too
long. I still hope it will be the default for 1.0 release, but if not,
I hope the next release won't be too far away.
> > On the other hand, I think it would be useful to be able to configure the
> > behaviour via .git/config.
>
> Yes, I would very much like to have this. I still want to go
> symrefs-only for public repositories created for cg-admin-setuprepo, so
> that fetching over HTTP works properly.
Agreed. By the way, the symref doesn't need to be called HEAD - it
could be "trunk" or "main" or "default-branch".
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 17:06 ` Pavel Roskin
@ 2005-11-15 18:21 ` Junio C Hamano
2005-11-16 1:56 ` Pavel Roskin
0 siblings, 1 reply; 24+ messages in thread
From: Junio C Hamano @ 2005-11-15 18:21 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Petr Baudis, Johannes Schindelin, git
Pavel Roskin <proski@gnu.org> writes:
> On Tue, 2005-11-15 at 13:18 +0100, Petr Baudis wrote:
>>
>> I'm ambivalent here. I would like to have just a single behaviour here,
>> since the symbolic ref otherwise really does not get much testing. But I
>> can also understand that we are breaking tools here.
>>
>> Still, for the reason above, I think we should aim at the symbolic refs
>> being the canonical format in the next major release after 1.0, giving
>> users time to fix their tools. I can see no advantage in symlinks except
>> the backwards compatibility...
The voice of reason comes from Pasky; I agree with this.
> I planned to write about symrefs long ago, and probably I waited for too
> long. I still hope it will be the default for 1.0 release, but if not,
> I hope the next release won't be too far away.
I think it is a bit too late for that, but please keep that
patch; I'll hold on to it too.
>> > On the other hand, I think it would be useful to be able to configure the
>> > behaviour via .git/config.
>>
>> Yes, I would very much like to have this.
I am in favor of that. Something like this, perhaps:
core.filemode = 1 # trustworthy
core.usesymlink = 0 # new style
> Agreed. By the way, the symref doesn't need to be called HEAD - it
> could be "trunk" or "main" or "default-branch".
Actually, I was thinking about changing get_sha1_basic() in
sha1_name.c so that refs immediately under ${GIT_DIR-.git} are
restricted to uppercase only. The other day I did
$ git-update-ref linus blah
which created .git/linus in addition to .git/refs/heads/linus;
this gives you considerable confusion.
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 18:21 ` Junio C Hamano
@ 2005-11-16 1:56 ` Pavel Roskin
2005-11-16 3:13 ` Junio C Hamano
0 siblings, 1 reply; 24+ messages in thread
From: Pavel Roskin @ 2005-11-16 1:56 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Petr Baudis, Johannes Schindelin, git
On Tue, 2005-11-15 at 10:21 -0800, Junio C Hamano wrote:
> Pavel Roskin <proski@gnu.org> writes:
> The voice of reason comes from Pasky; I agree with this.
OK, let's prepare for post-1.0 switchover then.
> I am in favor of that. Something like this, perhaps:
>
> core.filemode = 1 # trustworthy
> core.usesymlink = 0 # new style
Thanks for implemented this.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH] Disable USE_SYMLINK_HEAD by default
2005-11-15 12:18 ` Petr Baudis
` (2 preceding siblings ...)
2005-11-15 17:06 ` Pavel Roskin
@ 2005-11-16 1:05 ` Josef Weidendorfer
3 siblings, 0 replies; 24+ messages in thread
From: Josef Weidendorfer @ 2005-11-16 1:05 UTC (permalink / raw)
To: git
On Tuesday 15 November 2005 13:18, Petr Baudis wrote:
> being the canonical format in the next major release after 1.0, giving
Talking about versions...
Do we have an easy way to detect the format version of a git repository?
If not, I suggest git-init-db to add something like
echo "1" > .git/version
and let all the git-tools which read/write any files in .git themself
test against version 1. Or is this overkill?
Josef
^ permalink raw reply [flat|nested] 24+ messages in thread