Home » Eclipse Projects » EGit / JGit » Executable flags
|
Re: Executable flags [message #10942 is a reply to message #10932] |
Tue, 21 July 2009 19:30   |
Eclipse User |
|
|
|
Dmitry Smirnov wrote:
> I see there was some bug reported related to this problem
> ( http://code.google.com/p/egit/issues/detail?id=3&colspec =ID%20Type%20Status%20Priority%20Component%20Owner%20Summary)
>
>
> But it is unclear what is the status of it.
>
> I'm working on Windows and use Cygwin-based git sometimes, so this
> problem a little bit annoying.
> I see that neither FS_Win32.java nor FS_Win32_Cygwin.java does not
> handle canExecute and setExecute properly.
>
> Meantime, I suppose there could be some ways to fix it. For
> FS_Win32.java it could be some native code. FS_Win32_Cygwin.java could
> use 'chmod', for example.
You are right, the FS_Win32 implementations disable the setExecute
method support, even if the JVM is a Java 6 variant with setExecute
available in the java.io.File class.
For some reason commit 1432c8b2dd[1] says the setExecute method is
useless on Win32, but I don't remember why I wrote that. IIRC it was
something about every file being executable on Windows, no matter what,
which really disagreed with Git's concept of executable, especially in a
Cygwin based repository.
As for status of this bug, nobody is working on it right now, so its
just hanging out there. :-(
[1]
http://repo.or.cz/w/jgit.git?a=commit;h=1432c8b2ddbabdd285715fbe7a0be58e36014df5
|
|
|
Re: Executable flags [message #10973 is a reply to message #10942] |
Wed, 22 July 2009 08:57   |
Eclipse User |
|
|
|
Where can find info about "Git's concept of executable"?
I had played with some file on my machine.
Gygwin reports the following
D:\>ls -l artifacts.xml
-rwxrwxrwx 1 dsmirnov Russia_Eng 1270894 Jun 29 15:08 artifacts.xml
Windows file Properties->security shows that "Everyone" has Read&Execute
permissions (among others, including Full Control).
If I turn off executable flags with Cygwin (chmod 644), properties will
show 2 more users/groups (Domain Users and me personally). Both Domain
Users and Everyone will have only Read permission, while me having Read
and Write. No one will have Read&Execute.
So, I suppose we could rely on Cygwin to manage execution permission for
appropriate users/groups.
Shawn Pearce wrote:
> Dmitry Smirnov wrote:
>> I see there was some bug reported related to this problem
>>
( http://code.google.com/p/egit/issues/detail?id=3&colspec =ID%20Type%20Status%20Priority%20Component%20Owner%20Summary)
>>
>>
>> But it is unclear what is the status of it.
>>
>> I'm working on Windows and use Cygwin-based git sometimes, so this
>> problem a little bit annoying.
>> I see that neither FS_Win32.java nor FS_Win32_Cygwin.java does not
>> handle canExecute and setExecute properly.
>>
>> Meantime, I suppose there could be some ways to fix it. For
>> FS_Win32.java it could be some native code. FS_Win32_Cygwin.java could
>> use 'chmod', for example.
> You are right, the FS_Win32 implementations disable the setExecute
> method support, even if the JVM is a Java 6 variant with setExecute
> available in the java.io.File class.
> For some reason commit 1432c8b2dd[1] says the setExecute method is
> useless on Win32, but I don't remember why I wrote that. IIRC it was
> something about every file being executable on Windows, no matter what,
> which really disagreed with Git's concept of executable, especially in a
> Cygwin based repository.
> As for status of this bug, nobody is working on it right now, so its
> just hanging out there. :-(
> [1]
>
http://repo.or.cz/w/jgit.git?a=commit;h=1432c8b2ddbabdd285715fbe7a0be58e36014df5
|
|
|
Re: Executable flags [message #10986 is a reply to message #10942] |
Wed, 22 July 2009 16:43  |
Eclipse User |
|
|
|
Shawn Pearce wrote:
> Dmitry Smirnov wrote:
>> I see there was some bug reported related to this problem
>>
( http://code.google.com/p/egit/issues/detail?id=3&colspec =ID%20Type%20Status%20Priority%20Component%20Owner%20Summary)
>>
>>
>> But it is unclear what is the status of it.
>>
>> I'm working on Windows and use Cygwin-based git sometimes, so this
>> problem a little bit annoying.
>> I see that neither FS_Win32.java nor FS_Win32_Cygwin.java does not
>> handle canExecute and setExecute properly.
>>
>> Meantime, I suppose there could be some ways to fix it. For
>> FS_Win32.java it could be some native code. FS_Win32_Cygwin.java could
>> use 'chmod', for example.
>
> You are right, the FS_Win32 implementations disable the setExecute
> method support, even if the JVM is a Java 6 variant with setExecute
> available in the java.io.File class.
>
> For some reason commit 1432c8b2dd[1] says the setExecute method is
> useless on Win32, but I don't remember why I wrote that. IIRC it was
> something about every file being executable on Windows, no matter what,
> which really disagreed with Git's concept of executable, especially in a
> Cygwin based repository.
>
> As for status of this bug, nobody is working on it right now, so its
> just hanging out there. :-(
Well, I accepted the patch, because the execute bit is ill-defined on
Windows. Java has only one bit, cygwin has several and Windows doesn't
have a bit, but access control lists, which usually maps for the posix
bit and posix ACL's, but not completely. We can ignore most of the
problems for git here, as the execute bit in java pretty much matches
the execute bit concept as seen by git. We might still get into conflicts
with cygwin though, but maybe that's not our problem.
A more real problem is that Windows editors tend to set this bit when it's
not needed to you usually get it wrongly set when creating files on Windows.
I don't think much would get destroyed if we enable the bit for windows.
Btw, note that cygwinfs isn't detected unless you have cygwin in your path
or launches Eclipse from cygwin. We should also respect the core.filemode
flags set. A problem here is that on Windows msysgit/cygwin git sets it in
/etc/gitconfig, which is located, well "somewhere".
It might also be a performance issue to enable it since the file properties
or poorly handled by java. I was thinking about trying to reuse the
information Eclipse caches via resources someday.
-- robin
|
|
|
Re: Executable flags [message #573613 is a reply to message #10932] |
Tue, 21 July 2009 19:30  |
Eclipse User |
|
|
|
Dmitry Smirnov wrote:
> I see there was some bug reported related to this problem
> ( http://code.google.com/p/egit/issues/detail?id=3&colspec =ID%20Type%20Status%20Priority%20Component%20Owner%20Summary)
>
>
> But it is unclear what is the status of it.
>
> I'm working on Windows and use Cygwin-based git sometimes, so this
> problem a little bit annoying.
> I see that neither FS_Win32.java nor FS_Win32_Cygwin.java does not
> handle canExecute and setExecute properly.
>
> Meantime, I suppose there could be some ways to fix it. For
> FS_Win32.java it could be some native code. FS_Win32_Cygwin.java could
> use 'chmod', for example.
You are right, the FS_Win32 implementations disable the setExecute
method support, even if the JVM is a Java 6 variant with setExecute
available in the java.io.File class.
For some reason commit 1432c8b2dd[1] says the setExecute method is
useless on Win32, but I don't remember why I wrote that. IIRC it was
something about every file being executable on Windows, no matter what,
which really disagreed with Git's concept of executable, especially in a
Cygwin based repository.
As for status of this bug, nobody is working on it right now, so its
just hanging out there. :-(
[1]
http://repo.or.cz/w/jgit.git?a=commit;h=1432c8b2ddbabdd285715fbe7a0be58e36014df5
|
|
|
Re: Executable flags [message #573693 is a reply to message #10942] |
Wed, 22 July 2009 08:57  |
Eclipse User |
|
|
|
Where can find info about "Git's concept of executable"?
I had played with some file on my machine.
Gygwin reports the following
D:\>ls -l artifacts.xml
-rwxrwxrwx 1 dsmirnov Russia_Eng 1270894 Jun 29 15:08 artifacts.xml
Windows file Properties->security shows that "Everyone" has Read&Execute
permissions (among others, including Full Control).
If I turn off executable flags with Cygwin (chmod 644), properties will
show 2 more users/groups (Domain Users and me personally). Both Domain
Users and Everyone will have only Read permission, while me having Read
and Write. No one will have Read&Execute.
So, I suppose we could rely on Cygwin to manage execution permission for
appropriate users/groups.
Shawn Pearce wrote:
> Dmitry Smirnov wrote:
>> I see there was some bug reported related to this problem
>>
( http://code.google.com/p/egit/issues/detail?id=3&colspec =ID%20Type%20Status%20Priority%20Component%20Owner%20Summary)
>>
>>
>> But it is unclear what is the status of it.
>>
>> I'm working on Windows and use Cygwin-based git sometimes, so this
>> problem a little bit annoying.
>> I see that neither FS_Win32.java nor FS_Win32_Cygwin.java does not
>> handle canExecute and setExecute properly.
>>
>> Meantime, I suppose there could be some ways to fix it. For
>> FS_Win32.java it could be some native code. FS_Win32_Cygwin.java could
>> use 'chmod', for example.
> You are right, the FS_Win32 implementations disable the setExecute
> method support, even if the JVM is a Java 6 variant with setExecute
> available in the java.io.File class.
> For some reason commit 1432c8b2dd[1] says the setExecute method is
> useless on Win32, but I don't remember why I wrote that. IIRC it was
> something about every file being executable on Windows, no matter what,
> which really disagreed with Git's concept of executable, especially in a
> Cygwin based repository.
> As for status of this bug, nobody is working on it right now, so its
> just hanging out there. :-(
> [1]
>
http://repo.or.cz/w/jgit.git?a=commit;h=1432c8b2ddbabdd285715fbe7a0be58e36014df5
|
|
|
Re: Executable flags [message #573713 is a reply to message #10942] |
Wed, 22 July 2009 16:43  |
Eclipse User |
|
|
|
Shawn Pearce wrote:
> Dmitry Smirnov wrote:
>> I see there was some bug reported related to this problem
>>
( http://code.google.com/p/egit/issues/detail?id=3&colspec =ID%20Type%20Status%20Priority%20Component%20Owner%20Summary)
>>
>>
>> But it is unclear what is the status of it.
>>
>> I'm working on Windows and use Cygwin-based git sometimes, so this
>> problem a little bit annoying.
>> I see that neither FS_Win32.java nor FS_Win32_Cygwin.java does not
>> handle canExecute and setExecute properly.
>>
>> Meantime, I suppose there could be some ways to fix it. For
>> FS_Win32.java it could be some native code. FS_Win32_Cygwin.java could
>> use 'chmod', for example.
>
> You are right, the FS_Win32 implementations disable the setExecute
> method support, even if the JVM is a Java 6 variant with setExecute
> available in the java.io.File class.
>
> For some reason commit 1432c8b2dd[1] says the setExecute method is
> useless on Win32, but I don't remember why I wrote that. IIRC it was
> something about every file being executable on Windows, no matter what,
> which really disagreed with Git's concept of executable, especially in a
> Cygwin based repository.
>
> As for status of this bug, nobody is working on it right now, so its
> just hanging out there. :-(
Well, I accepted the patch, because the execute bit is ill-defined on
Windows. Java has only one bit, cygwin has several and Windows doesn't
have a bit, but access control lists, which usually maps for the posix
bit and posix ACL's, but not completely. We can ignore most of the
problems for git here, as the execute bit in java pretty much matches
the execute bit concept as seen by git. We might still get into conflicts
with cygwin though, but maybe that's not our problem.
A more real problem is that Windows editors tend to set this bit when it's
not needed to you usually get it wrongly set when creating files on Windows.
I don't think much would get destroyed if we enable the bit for windows.
Btw, note that cygwinfs isn't detected unless you have cygwin in your path
or launches Eclipse from cygwin. We should also respect the core.filemode
flags set. A problem here is that on Windows msysgit/cygwin git sets it in
/etc/gitconfig, which is located, well "somewhere".
It might also be a performance issue to enable it since the file properties
or poorly handled by java. I was thinking about trying to reuse the
information Eclipse caches via resources someday.
-- robin
|
|
|
Goto Forum:
Current Time: Thu May 01 20:59:03 EDT 2025
Powered by FUDForum. Page generated in 0.03695 seconds
|