Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable basic support for
worktreeconfig
to unblock sparse checkout.
`libgit2` library by default fails any operation if it encounters any unrecognised extensions configured in a repo, as per Git documentation. ref: https://git-scm.com/docs/repository-version > If a version-1 repository specifies any extensions.* keys that the > running git has not implemented, the operation MUST NOT proceed. > Similarly, if the value of any known key is not understood by the > implementation, the operation MUST NOT proceed. If a repository is using a sparse checkout mode it force enables the `worktreeconfig` extensions which allows setting configuration in repo on a per worktree basis, to enable some of the sparse checkout functionality. Since `stg` is using `libgit2` library only as an interface to object database and for looking up alias lookup from git configuration (i.e. Read Only operation) and uses git cli for everything else, it is relatively safe to ignore per worktree git configuration. This patch adds `worktreeconfig` extension to the `libgit2` extension whitelist. CLOSES stacked-git#195 Signed-off-by: Oleg Utkin <oleg@nonlogical.io>
- Loading branch information