[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Switching from CVS to GIT
From: |
David Kastrup |
Subject: |
Re: Switching from CVS to GIT |
Date: |
Mon, 15 Oct 2007 10:56:18 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
Johannes Schindelin <address@hidden> writes:
> Hi,
>
> On Mon, 15 Oct 2007, Eli Zaretskii wrote:
>
>> > Date: Mon, 15 Oct 2007 00:45:47 +0100 (BST)
>> > From: Johannes Schindelin <address@hidden>
>> > cc: Alex Riesen <address@hidden>, address@hidden, address@hidden,
>> > address@hidden, address@hidden
>> >
>> > The problem is not so much opening, but determining if an existing file
>> > and a file in the index have the same name.
>> >
>> > For example, "README" in the index, but "readme" in the working directory,
>> > will be handled as "deleted/untracked" by the current machinery. IOW git
>> > will not know that what it gets from readdir() as "readme" really is the
>> > same file as "README" in the index.
>>
>> That's because you think file names are simple strings and can be
>> compared by simple string comparison.
>
> Almost...
>
>> This na?ve view is not true even on POSIX systems: "foo/bar" and
>> "/a/b/foo/bar" can be the same file, as well as "/a/b/c/d" and "/x/y/z",
>> given the right symlinks.
>
> ... not quite, ah ...
>
>> But for some reason that eludes me, people who are accustomed to POSIX
>> stop right there and in effect say "file names are strings, if we only
>> make them absolute and resolve links".
>
> ... yes! There you have it. Absolute filenames, resolved by
> readlink() are assumed to be the unique (!) identifiers for the
> contents.
They aren't. One can mount the same file system several times in
different places. In Linux, one can even mount directories and files
to several places at once. Most Unices also support some
case-insensitive file systems, and readlink does not canonicalize the
casing.
> _Note:_ absolute paths _without_ readlink() resolving are _still_
> unique identifiers; this time for files/symlinks.
Not even that. A unique identifier for files would imply that
touching the file does not affect, say, the access times of files with
other unique identifiers.
--
David Kastrup
- Re: Switching from CVS to GIT, (continued)
- Re: Switching from CVS to GIT, Alex Riesen, 2007/10/15
- Re: Switching from CVS to GIT, Brian Dessent, 2007/10/15
- Re: Switching from CVS to GIT, Eli Zaretskii, 2007/10/15
- Re: Switching from CVS to GIT, Earnie Boyd, 2007/10/15
- Re: Switching from CVS to GIT, Eli Zaretskii, 2007/10/15
- Re: Switching from CVS to GIT, Earnie Boyd, 2007/10/15
- Re: Switching from CVS to GIT, Eli Zaretskii, 2007/10/15
- Re: Switching from CVS to GIT, Johannes Schindelin, 2007/10/15
- Re: Switching from CVS to GIT,
David Kastrup <=
- Re: Switching from CVS to GIT, Alex Riesen, 2007/10/15
- RE: Switching from CVS to GIT, Dave Korn, 2007/10/15
- RE: Switching from CVS to GIT, Johannes Schindelin, 2007/10/15
- Re: Switching from CVS to GIT, Alex Riesen, 2007/10/15
- Re: Switching from CVS to GIT, Alex Riesen, 2007/10/15
- Re: Switching from CVS to GIT, Andreas Ericsson, 2007/10/14
- Re: Switching from CVS to GIT, Daniel Barkalow, 2007/10/15
- Re: Switching from CVS to GIT, Eli Zaretskii, 2007/10/16
- Re: Switching from CVS to GIT, Andreas Ericsson, 2007/10/16
- Re: Switching from CVS to GIT, Eli Zaretskii, 2007/10/16