-
-
Notifications
You must be signed in to change notification settings - Fork 414
Open
Description
Description
Add support for the GIT_COMMON_DIR environment variable, which allows Git to use a separate git directory and work tree.
Background
The GIT_COMMON_DIR environment variable specifies the path to the git directory when it's separate from the working tree. This is particularly useful for:
- Git worktrees where multiple working directories share the same git objects
- Custom repository layouts where the
.gitdirectory is not in the working tree root
Use Case in Dulwich
This would be valuable for Dulwich users who:
- Work with multiple worktrees
- Have custom repository setups with separate git directories
- Need to interact with repositories that use this Git feature
Implementation Notes
This would require updating repository discovery and initialization code to respect the GIT_COMMON_DIR environment variable when locating git objects and references.