Skip to content

Repository cannot be loaded if both strict_config(true) and $GIT_WORK_TREE are set #1985

Closed
@yuja

Description

@yuja

Current behavior 😯

The following code errors out if GIT_WORK_TREE environment variable is set to e.g. the worktree directory path.

    let repo = gix::open::Options::default()
        .strict_config(true)
        .open(path)?;
Error: Failed to load the git configuration

Caused by:
    The key "core.worktree" (possibly from GIT_WORK_TREE) was invalid

Expected behavior 🤔

I'm not sure if the current behavior is expected, but I think a valid GIT_WORK_TREE should be either respected or ignored at all.

Git behavior

No response

Steps to reproduce 🕹

No response


Original issue:
jj-vcs/jj#6437

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions