git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: An idea: maybe Git should use a lock/unlock file mode for problematic files? [Was: Re: after first git clone of linux kernel repository there are changed files in working dir]

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jan 21, 2009, 07:25 UTC
Message-ID
<81b0412b0901202325y7a468374i4b1b3da0c7bd48dc@mail.gmail.com>
In-Reply-To
<alpine.LNX.1.00.0901201833400.19665@iabervon.org>
2009/1/21 Daniel Barkalow <barkalow@iabervon.org>:
Show 16 quoted lines
> On Wed, 21 Jan 2009, Alex Riesen wrote:
>
>> 2009/1/20 Daniel Barkalow <barkalow@iabervon.org>:
>> > My impression was that this didn't happen in practice, because teams
>> > would tend to not have two people create the same file at the same time,
>> > but with different cases, and people interacting with the same file at
>> > different times would use whatever case it was introduced with.
>>
>> It will and does happen in practice (annoingly too often even). Not with Git
>> yet (with Perforce), where people do "branching" by simply copying things
>> in another directory (perforce world does not know real branches),
>> renaming files randomly, and putting the new directory back in the
>> system (or maybe it is the strange tools here which do that - often
>> it is the first character of a directory or file which gets down- or up-cased).
>
> How does the resulting code work at all? ...

Sometimes it does not. Sometimes it does. Depends on that particular checkout order perforce (or user?) selected to use this time.

> ... With a case-sensitive filesystem,
> most of the files you're using don't have the expected names any more, and
> most systems will therefore not actually build or run.

Except that there is no case-sensitive file systems on development machines. So a botched case wont be noticed by a standard build procedure unless the content of the files causes an error.

Show 15 quoted lines
>> As Perforce itself is case sensitive (like Git), using of such branches
>> is a nightmare: the files get overwritten in checkout order which is
>> not always sorted in predictable order. Combined with case-stupidity
>> of the file system the working directories sometimes cause "interesting
>> time" for unlucky users.
>> Luckily (sadly) it is all-opening-in-a-wall shop, so the problem with "fanthom"
>> files is rare (it is hard to notice) for most. Which actually makes it more
>> frustrating when the real shit happens.
>>
>> And it will happen to Git as well, especially if development go crossplatform.
>> It is not that hard to accidentally rename a file on case-sensitive file system,
>> "git add *" it and commit without thinking (that's how most of software
>> development happens, come to think of it).
>
> People can accidentally rename files?
Aside from tools (and in my own experience - I did) - they can and do.
> And still have things work when they do it on a case-sensitive filesystem?

Shameless luck, I'd say. That and "no file systems permitted, but the one from finance dept".

Previous: Daniel BarkalowNext: rdkrsr
Message 10 of 16 in “after first git clone of linux kernel repository there are changed files in working dir”
  1. rdkrsrDec 10, 2008
  2. Brett SimmersDec 10, 2008
  3. Hannu KoivistoJan 19, 2009
  4. An idea: maybe Git should use a lock/unlock file mode for problematic files? [Was: Re: after first git clone of linux kernel repository there are changed files in working dir]thestar@fussycoder.id.au, Jan 19, 2009
  5. Daniel BarkalowJan 20, 2009
  6. John ChapmanJan 20, 2009
  7. Daniel BarkalowJan 20, 2009
  8. Alex RiesenJan 20, 2009
  9. Daniel BarkalowJan 21, 2009
  10. Alex RiesenJan 21, 2009
  11. Fwd: after first git clone of linux kernel repository there are changed files in working dirrdkrsr, Dec 11, 2008
  12. Linus TorvaldsDec 11, 2008
  13. rdkrsrDec 11, 2008
  14. Boyd Stephen Smith Jr.Dec 11, 2008
  15. Giuseppe BilottaDec 11, 2008
  16. Nick AndrewDec 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.