Closed pervoj closed 3 years ago
perhaps a better approach would be to test for git
in our PATH before deciding to set up a repo?
Maybe so, but I think this is sufficient.
When running as a Flatpak, the application could not find Git.
But a flatpak might be in an environment where it does have access to git
, no? I think if a flatpak depended on an SDK that included that it would work. So shouldn't we be a little more flexible here?
I've been looking for ways to give an application running via Flatpak access to git, and the only way seems to be packing git in a Flatpak package, but it doesn't seem like the best solution, since I only need the repository creation feature.
The second option is to create the .git
directory manually from code. This option seems better to me. Therefore, I would need to be able to turn off the git init
call so that an error message is not displayed.
The second option is to create the
.git
directory manually from code.
Well this wouldn't work. It's not just the .git
directory, but the database that git creates you'd need to create on your own.
There should be some way to test whether git
is in path and then avoid this code. I think GLib has such a utility.
It should be better now.
Sorry for the late reply, I was quite busy lately.
Done. Thanks for your contribution. :)
I added the functionality for #13.