|Issuing jgit commands (commit) without command line interface [message #559719]
||Fri, 17 September 2010 16:52
| Michael Lantz
Registered: September 2010
I have slowly started to implement parts of JGit into my project over time. I was able to successfully implement a custom method which would stage and commit a particular file.
I have recently upgraded the build to find that the Commit (Staging still works) class in org.eclipse.jgit.lib is hidden/renamed and can no longer can be used as I had intended.
Instead of re-testing and utilizing the new CommitCommand Class I would simply like to have a basic method to allow execution of commands without use of command line. I would be able to pass the git directory, command, subcommand, etc and a commit, checkout, etc be performed)
As the workflows for jgit are a bit overwhelming I would like to use something similar to a command line version of jgit/git, by simply using a java api method or class. I would still like to be aware of any exceptions but would like the benefit of not having in-depth working knowledge of all jgit classes (unless required for exception investigation). I would like to be able to use a class similar to Main in org.eclipse.jgit.pgm to accomplish this, I have started to take out the pieces that heavily rely on passing command line arguments and passing static values for the command, subcommand, git dir, etc. I will continue to do so, but I was wondering if anyone had a similar request, or even a working example.
My main goal would be to call a method from another class
eg ( executeGitCommand("commit - m \"This is easy\" --gitdir \"C:\\VP-Git\\.git\" ")
I don't mind having to adopt a new commit method, but as my previous commit was working, I do not want to continue to re-write methods as the project evolves and new builds are distributed.
Thanks in advance,
[Updated on: Fri, 17 September 2010 16:56]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02784 seconds