]> source.dussan.org Git - jgit.git/commit
Probe filesystem and set core.filemode correctly 01/1601/1
authorShawn O. Pearce <spearce@spearce.org>
Wed, 15 Sep 2010 14:59:38 +0000 (07:59 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 15 Sep 2010 14:59:38 +0000 (07:59 -0700)
commit3fe527624dcecd96c16901d6621a2e37e7ef814a
tree91382679b1e95951fb96fe8cec3347a3581d60ec
parent9d14f56442fe02bc3417b26c1211b9f1d0ee476a
Probe filesystem and set core.filemode correctly

When creating a new FileRepository, probe the capability of the
local filesystem and set core.filemode based on how it reacts.

We can't just rely on FS.supportsExecute() because a POSIX system
(which usually does support execute) might be storing the repository
on a partition that doesn't have execute support (e.g. plain FAT-32).

Creating a temporary file, setting both states, checking we get
the desired results will let us set the variable correctly on
all systems.

Change-Id: I551488ea8d352d2179c7b244f474d2e3d02567a2
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileRepository.java