eclipse-jgit / jgit

JGit, the Java implementation of git
https://www.eclipse.org/jgit/
Other
117 stars 33 forks source link

Conditional Include in gitconfig #9

Open kwin opened 8 months ago

kwin commented 8 months ago

Description

Although not explicitly listed in https://github.com/eclipse-jgit/jgit/blob/b1cc74b75b771279d81de15833da514c71513648/Documentation/config-options.md conditional includes are not supported yet by JGit. Those were added with Git 2.13

Motivation

This is very useful if slightly different configs should be used for several repositories (sharing the same root folder). Compare with https://stackoverflow.com/questions/21307793/set-git-config-values-for-all-child-folders

Alternatives considered

The only workaround would be repository specific configurations which leads to a lot of config duplication and effort to initially set this correctly

Additional context

No response

tomaswolf commented 8 months ago

See also Eclipse bugzilla 543171 for an earlier report and some comments.

kwin commented 8 months ago

Thanks for the link. Maybe only path conditions (gitdir:) can be evaluated to simplify the implementation.