[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Hello,
I made a branch from 5.2 where I got rid of java.io.File.
I haven't removed public methods with File(s) marking them as deprecated.
The motivation to make a fork was basically desire to use in-memory file
system, something like:
FileSystem fs = Jimfs.newFileSystem(Configuration.unix());
Path path = Files.createDirectory(fs.getPath("/myrepo"));
CloneCommand clone = Git.cloneRepository();
clone.setURI(MY_GIT);
clone.setDirectory(path);
clone.setCloneAllBranches(true);
clone.setBranch("refs/heads/master");
Git git = clone.call();
Files.walk(path).forEach(System.out::println);
There are many possible pitfalls and I definitely need a lot of tests:
1. java io rises FileNotFoundException, while nio NoSuchFileException -
need to check old (deprecated) APIs because they would rise NoSuchFile.
2. there is a code that run external process from the git directory. for
jomfs path.toFile() will fail.
3. double check all attributes - hidden, readonly etc...
4. in many places (locking) jgit uses force() to synchronize with file
system. I tried to change it to SYNC, but it's not the same.
5. there is no delete on exit in nio.
6. in the original too many hand parsing with replace('\\', '/') -
manual paths parsing... sure this can be done simplier...
Any comments, ideas... code :-) are welcome
Dmitry
- Prev by Date:
[jgit-dev] [Announce] [Security] Security fixes available in JGit releases 4.5.5, 4.7.7, 4.9.8, 4.11.6, 5.1.5, 5.2.1
- Next by Date:
[jgit-dev] Raising minimum supported Eclipse platform version from 4.5 to 4.6
- Previous by thread:
[jgit-dev] [Announce] [Security] Security fixes available in JGit releases 4.5.5, 4.7.7, 4.9.8, 4.11.6, 5.1.5, 5.2.1
- Next by thread:
[jgit-dev] Raising minimum supported Eclipse platform version from 4.5 to 4.6
- Index(es):