I believe that I can get the SHA values of all the files in a folder through command line by using git ls-files -s <file name>
command. I want to know if there is an equivalent way in JGit Java library?
PS: I don't want to calculate SHA of files myself and there can be many files inside the folder so I need to get SHAs which are already present in git objects. Also, I can't do Runtime.getRuntime().exec("git ls-files -s")
as the host machine will not identify git
itself.