|Creating a new commit entirely from memory, programmatically [message #1220803]
||Fri, 13 December 2013 17:27
| Laurent Petit
Registered: December 2010
We are basing our web application persistence on JGit.
We are already walking Commits and Trees programmatically to provide read-only views without a working copy on disk.
We'd also like to provide "save" transactions in our application by creating new commits based off the previous ones programmatically, and without working copy on disk either.
If you can give me some guidance on how to do that, that would be very welcome.
Right now I'm aware that I can resolve the HEAD commit object id, from them get the Tree, go down to the Blob, modify the blob, and then recreate new Blob & new Tree up to a new root Tree, and then create a commit.
I've seen some utility classes like DirCacheBuilder / DirCacheEditor, but they seem to touch the filesystem at some times, unless I'm mistaken ?
Are there any utility methods inside JGit (or provided by third-party libraries ?) to manipulate Trees and create new commits without filesystem working copy ?
[Updated on: Fri, 13 December 2013 17:28]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01941 seconds