Hi Tom,
TortoiseGit uses (self-compiled, partly integrated) libgit, libgit2 and
git.exe. We try to keep all dependencies as up2date as possible.
Disabling libgit2 makes TortoiseGit, depending on the specific function,
fall back to libgit (sometimes referred to as gitdll in TortoiseGit;
only used for very specific functions for performance reasons so that we
don't need to fork lots of git.exe processes; e.g. for diffing
commits/files for the log dialog) or git.exe.
I suppose for your use case you could disable libgit2, but you could
also just try to disable specific libgit2 calls that might be dangerous
in your scenario (using libgit2_mask): I suppose leaving out GIT_CMD_ADD
should be sufficient (cf.
<
https://gitlab.com/tortoisegit/tortoisegit/-/blob/32f7cbfe27a15159c01fc6771de15fe23ecdc52f/src/Git/Git.cpp#L220-222>
and
<
https://gitlab.com/tortoisegit/tortoisegit/-/blob/32f7cbfe27a15159c01fc6771de15fe23ecdc52f/src/Git/Git.h#L33>).
maybe you also need to disable the usage of libgit (we use that for
updating the index when refreshing the commit dialog).
I hope this helps.
Best,
Sven
PS: Please open an issue in the libgit2 issue tracker, so that they
priorize implementing working_tree_encoding (cf.
<
https://github.com/libgit2/libgit2/issues>).
Am 18.01.2021 um 23:39 schrieb Tom Huibregtse:
> Hello,
>
> We are managing a git repository that uses UTF-16-LE-BOM files with
> extension .uni. It is critical for us to be able to use git's
> working-tree-encoding
> <
https://git-scm.com/docs/gitattributes#_working_tree_encoding> feature
> for these files. My understanding is that this feature works in git
> version v2.21.0 at the earliest. Unfortunately, this feature is not in
> libgit2, so we need to disable libgit2.
>
> I was under the impression that by setting TortoiseGit's "UseLibGit2"
> setting to false that we would fall back to using the git.exe that is
> installed on the Windows system external to TortoiseGit. However, after
> looking at the release notes
> <
https://tortoisegit.org/docs/releasenotes/> and then cloning and