sourcegit-scm / sourcegit

Windows/macOS/Linux GUI client for GIT users
MIT License
909 stars 96 forks source link

Worktree repository display bug #86

Closed gadfly3173 closed 4 months ago

gadfly3173 commented 4 months ago

After commit, reset, and other operations in the new repository created by git worktree, it will not be immediately displayed in the tab where the worktree repository is located, but will be displayed in the tab of the original repository. I need to reopen the worktree repository to display it.

Run command such as git log in worktree repository in console would has correct result.

love-linger commented 4 months ago

The worktree feature is not in the supported list for the current version.

gadfly3173 commented 4 months ago

The reset command can trigger Watcher.OnRepositoryChanged on these path

FullPath: ${originRepo}/.git/worktrees/${worktreeRepo}/logs/HEAD
Name: logs/HEAD

FullPath: ${originRepo}/.git/worktrees/${worktreeRepo}/ORIG_HEAD
Name: ORIG_HEAD

FETCH button triggered this:

FullPath: ${originRepo}/.git/worktrees/${worktreeRepo}/FETCH_HEAD
Name: FETCH_HEAD
love-linger commented 4 months ago

Could you please write a PR? I have not used the worktree feature.

love-linger commented 4 months ago

You can try commit 1fe050ed0bf4eb7ea6753e47eb7baca6d5d3f064.

gadfly3173 commented 4 months ago

You can try commit 1fe050e.

It seems good. I'll close #89 and create anothor PR with commit 1627f8853c2fabdcb287d0accda095e1fb695788