-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dura fails to capture anything if a worktree is present as a subdir of the working directory #89
Comments
Thanks for reporting. I don't have much time to look at it this weekend, but I might next week. I'm not quite sure what's going on. |
It seems to be an issue with git2. A minimal example that reproduces this is: use git2::{Repository, IndexAddOption};
fn main() {
let repo = Repository::open("./").unwrap();
let mut index = repo.index().unwrap();
index.add_all(["*"].iter(), IndexAddOption::DEFAULT, None).unwrap();
} I'm not sure if the git2/libgit2 behavior here is a bug. Git itself when asked to |
This is a git2-rs behaviour which returns
Not sure if the preferred behaviour for dura would be ignoring these paths or adding them into consideration for checking the diff. Personally, I'd probably ask dura to watch the repos in subdirectory separately. |
The ideal scenario I guess would be a
Do you think using the existing |
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
orcapture
).Consider this example:
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.
The text was updated successfully, but these errors were encountered: