Open palexdev opened 8 months ago
Hi,
Sorry for very late reply & thanks for the comments.
I was a bid dubitative, about why it's confusing to do that:
SympleGit sympleGit = SympleGit.custom()
.setDirectory(repoDirectoryPath)
.build();
Could you please elaborate a little? I'm not sure of the importance of the issue.
About the progress monitor, I clearly understand the need, but can you tel when it's important to set up monitor? Maybe my projects are not big enough, I never had the need...
Of course, we will do it cleanly, extendable like you wish.
Best, N.
Hello, I just wanted to leave some feedback on this library.
Context
I'm developing a tool which needs Git functionalities. In particular, but not limited to, it has to clone a huge amount of repositories from different sources. I started by using
JGit
but it's so bad it's almost ridiculous. Very often, clone operations are super slow and would end with aEOF
exception. Of course, it does not happen with the native command.Switching to SympleGit
Let's say that the README is quite catchy:
In my honest opinion, it cannot be more false. JGit is super easy to use, at least in my use case, every git command is a class in JGit. In SympleGit the clone command class does not exist. The great thing about SympleGit is that it uses the native command to perform operations, which is so much faster and performant. The bad thing, again in my opinion, is that the API is not so well thought, and it's lacking. 1) The idea of creating custom git commands with
executeGitCommand(...)
surely is good to cover all cases even those that are not implemented yet, but still having them implemented as classes would make everything much easier to use. 2) It's so confusing to do this:Why do I have to give the directory here instead of giving it to the command directly? Like this for JGit:
I find it a bit more intuitive 3) I read the README multiple times, but I still don't know how I can track the progress of a command. Probably because, yet again, it's not very intuitive. By nature, working with
Process
andProcessBuilder
in Java is a cumbersome task, processing the output of a process properly is hard. And for this very reason, a library that uses such APIs should make it as easy as possible for the end user to use it. The first thing that comes to my mind when I want to track the progress of an external process is something like this:JGit here is doing a far better job here, I can modify the above command like this:
Conclusion
I believe SympleGit could become a very good alternative to JGit, but it definitely needs to grow, improve and expand the API. In the meantime, I think I'll implement a custom solution that uses the native command just like SympleGit because it's simply much much better than JGit which crashes all the time.