threads / discuss / 19741

problem with file mode

Subject: problem with file mode

## tl;dr

6 messages between Jun 8, 2009 and Jun 8, 2009.

replies: 5people: 3as markdown or json

Andrew Romanenco· Jun 8, 2009, 09:09 UTC · lore
Hello
I have problem with cloning git repo

Both stations are ubuntu 8.10 And I have repo with text files on station A When I do git clone to station B all files become executable 755 And git status show that all files are modified, diff shows mode change

could you help me with this issue?

thanks Andrew

Jeff King· Jun 8, 2009, 12:30 UTC · re: Andrew Romanenco · lore

Re: problem with file mode

On Mon, Jun 08, 2009 at 12:09:23PM +0300, Andrew Romanenco wrote:
> Both stations are ubuntu 8.10
> And I have repo with text files on station A
> When I do git clone to station B all files become executable 755
> And git status show that all files are modified, diff shows mode change

What filesystem is station B running? Is it something that actually has a proper executable bit (i.e., not FAT or similar)?

-Peff
Andrew Romanenco· Jun 8, 2009, 13:49 UTC · re: Jeff King · lore

Re: problem with file mode

true - B is Fat
On Mon, Jun 8, 2009 at 3:30 PM, Jeff King<peff@peff.net> wrote:
Show 12 quoted lines
> On Mon, Jun 08, 2009 at 12:09:23PM +0300, Andrew Romanenco wrote:
>
>> Both stations are ubuntu 8.10
>> And I have repo with text files on station A
>> When I do git clone to station B all files become executable 755
>> And git status show that all files are modified, diff shows mode change
>
> What filesystem is station B running? Is it something that actually has
> a proper executable bit (i.e., not FAT or similar)?
>
> -Peff
>
-- 
Best regards,
Andrew Romanenco

        Software developer
        Microsoft Certified Professional (win2k)
        Microsoft Certified Database Administrator
        Sun Certified Java Programmer
        Sun Certified Web Component Developer
        Oracle Database 10g Administrator Certified Associate

        mailto:andrew@romanenco.com
        http://www.romanenco.com
Jeff King· Jun 8, 2009, 13:57 UTC · re: Andrew Romanenco · lore

Re: problem with file mode

On Mon, Jun 08, 2009 at 04:49:44PM +0300, Andrew Romanenco wrote:
> true - B is Fat
Then you probably want to:
  git config core.filemode false

on B. Though I thought we automagically tested whether the filesystem supported executable bits when creating the repository. Did you create the repository on a different filesystem and then move it to FAT, or did you directly clone to FAT?

-Peff
Andrew Romanenco· Jun 8, 2009, 14:08 UTC · re: Jeff King · lore

Re: problem with file mode

I have create repo on ext3 and cloned it to fat
thak you for your help
On Mon, Jun 8, 2009 at 4:57 PM, Jeff King<peff@peff.net> wrote:
Show 15 quoted lines
> On Mon, Jun 08, 2009 at 04:49:44PM +0300, Andrew Romanenco wrote:
>
>> true - B is Fat
>
> Then you probably want to:
>
>  git config core.filemode false
>
> on B. Though I thought we automagically tested whether the filesystem
> supported executable bits when creating the repository. Did you create
> the repository on a different filesystem and then move it to FAT, or did
> you directly clone to FAT?
>
> -Peff
>
-- 
Best regards,
Andrew Romanenco

        Software developer
        Microsoft Certified Professional (win2k)
        Microsoft Certified Database Administrator
        Sun Certified Java Programmer
        Sun Certified Web Component Developer
        Oracle Database 10g Administrator Certified Associate

        mailto:andrew@romanenco.com
        http://www.romanenco.com
Johannes Sixt· Jun 8, 2009, 14:50 UTC · re: Jeff King · lore

Re: problem with file mode

Jeff King schrieb:
Show 9 quoted lines
> On Mon, Jun 08, 2009 at 04:49:44PM +0300, Andrew Romanenco wrote:
>> true - B is Fat
> 
> Then you probably want to:
> 
>   git config core.filemode false
> 
> on B. Though I thought we automagically tested whether the filesystem
> supported executable bits when creating the repository.
We do. Our test basically:
   lstat()
   chmod(st_mode ^ S_IXUSR)
   lstat()

but Linux (Andrew said he's on Ubuntu) keeps the mode bits that user-space requested with chmod() in the cache long enough that the subsequent lstat() call sees what it just requested. So, our test doesn't notice that the x-bit is not written to the filesystem.

:-(
-- Hannes

← back to recent threads