Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Abstract File IO using Path instead of File(Feature request for more general file system support underlying repositories)
Abstract File IO using Path instead of File [message #1827497] Fri, 15 May 2020 20:57 Go to next message
Olivier Cailloux is currently offline Olivier CaillouxFriend
Messages: 37
Registered: July 2009
Member
Currently, JGit mostly requires a "normal" file system as a support for its repositories. "Mostly", because there is also an InMemoryFileSystem and a DFS mechanism, but they are pretty limited (for example, do not support (most of?) the git porcelain API).

Is there some willingness to gradually migrate towards the "new" FileSystem abstraction introduced in Java 7? By this, I mean, accepting Path objects instead of (or, for backwards compatibility, in supplement to) File objects, and reading and writing "abstract files" through path objects using the Files API? This would permit to, probably, getting rid of (most of?) the DFS mechanism, thereby simplifying the code, while at the same time greatly expanding JGit's power.

For example, it would permit to clone a repository on an in-memory file system (such as JimFS), and manage that repository exactly as if it was on a "real" disk, with no limitations. That'd be quite cool.

(I have not found any discussion of this in this forum or on the JGit bugzilla.)

[Updated on: Fri, 15 May 2020 20:58]

Report message to a moderator

Re: Abstract File IO using Path instead of File [message #1828091 is a reply to message #1827497] Mon, 01 June 2020 12:21 Go to previous messageGo to next message
Olivier Cailloux is currently offline Olivier CaillouxFriend
Messages: 37
Registered: July 2009
Member
Perhaps this bug is related, I am not sure.
Re: Abstract File IO using Path instead of File [message #1828461 is a reply to message #1828091] Wed, 10 June 2020 08:34 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1180
Registered: July 2009
Senior Member
This is tracked in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=526500

We need to do this in a major release since switching from old File to Path will break a lot of APIs in JGit
and there is no point in duplicating the API for that.
Previous Topic:egit clone throws exception
Next Topic:JGit Build Failure by maven
Goto Forum:
  


Current Time: Sun Jul 25 04:04:52 GMT 2021

Powered by FUDForum. Page generated in 0.06815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top