| | |
| | | import com.gitblit.models.PathModel.PathChangeModel;
|
| | | import com.gitblit.models.RefModel;
|
| | | import com.gitblit.models.SubmoduleModel;
|
| | | import com.sun.jna.Library;
|
| | | import com.sun.jna.Native;
|
| | |
|
| | | /**
|
| | | * Collection of static methods for retrieving information from a repository.
|
| | |
| | | config.setBoolean("receive", null, "denyNonFastforwards", true);
|
| | | config.save();
|
| | |
|
| | | if (! System.getProperty("os.name").toLowerCase().startsWith("windows")) {
|
| | | final CLibrary libc = (CLibrary) Native.loadLibrary("c", CLibrary.class);
|
| | | if (! JnaUtils.isWindows()) {
|
| | |
|
| | | //libc.chmod("/path/to/file", 0755);
|
| | | }
|
| | |
| | | } catch (IOException e) {
|
| | | throw new RuntimeException(e);
|
| | | }
|
| | | }
|
| | | interface CLibrary extends Library {
|
| | | public int chmod(String path, int mode);
|
| | | }
|
| | | private enum GitConfigSharedRepositoryValue {
|
| | | UMASK("0", 0), FALSE("0", 0), OFF("0", 0), NO("0", 0),
|