desktop / dugite-native

A toolchain for building a portable, cross-platform Git for applications
GNU General Public License v2.0
193 stars 108 forks source link

Document usage in non-JS languages #357

Open makew0rld opened 2 years ago

makew0rld commented 2 years ago

JavaScript or TypeScript users can just use the dugite package to access these binaries. But it's not clear how to use them in other languages. After looking at this file, I've come up with the following environment variables that need to be set:

# Assuming the dugite folder is in the current directory
export GIT_EXEC_PATH="$(pwd)/libexec/git-core"
export GIT_TEMPLATE_DIR="$(pwd)/share/git-core/templates"
export GIT_SSL_CAINFO="$(pwd)/ssl/cacert.pem"

Once those env vars are set, ./bin/git will be be able to work properly, at least in my experience.

It'd be nice if this could be documented in this repo. Thanks!