Skip to content

Dura fails to capture anything if a worktree is present as a subdir of the working directory #89

@DeeUnderscore

Description

@DeeUnderscore

If you have an unignored worktree checked out in a subdirectory of the main working directory of a git repository, Dura will fail to capture any changes (whether by watch or capture).

Consider this example:

$ git init
$ echo 'beep' > boop
$ git add . && git commit -m 'initial commit'
$ dura capture # works correctly at this point
$ git worktree add -d wrktree HEAD
$ dura capture
Dura capture failed: invalid path: 'wrktree/'; class=Index (10)

If wrktree/ is added to .gitignore, Dura continues working fine.

This is admittedly a bit of an edge case, and perhaps an unconventional way to use worktrees, but Dura failing in this situation can also be a surprise to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions