Summary: | Dolphin constantly recreates .git/index.lock file, effectively breaking git | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Nikita Skovoroda <chalkerx> |
Component: | plugins: git | Assignee: | Sebastian Dörner <sebastian> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dolphin-bugs-null, justin.zobel, nate, sebastian.englbrecht |
Priority: | NOR | ||
Version: | 17.12.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/sdk/dolphin-plugins/commit/31f46bf7b2cee0156bd57525b2f5e78d41578d7b | Version Fixed In: | 20.12 |
Description
Nikita Skovoroda
2016-05-27 06:51:25 UTC
Still reproducable on 17.12.1. To observe this, the git plugin should be enabled in Dolphin. I can reproduce the generation of a lockfile but it gets destroyed instantly. After looking into the code of the plugin, I think the lockfile gets created while searching for the stati of the files, see: https://github.com/KDE/dolphin-plugins/blob/d69ced47023c52078854e96bcdfa6ec3675251ec/git/fileviewgitplugin.cpp#L176 The git status command generates a lockfile automatically. So in a way, by changing the folder you "manually" perform a git operation (unconsciously). git status is locking because it is caching the status in the repository. It cannot be disabled in git. We could try to use the workaround number 2 of https://stackoverflow.com/questions/27706108/git-do-not-create-index-lock-for-read-only-operations (In reply to Nopeinger from comment #2) > I can reproduce the generation of a lockfile but it gets destroyed instantly. > > After looking into the code of the plugin, I think the lockfile gets created > while searching for the stati of the files, see: > https://github.com/KDE/dolphin-plugins/blob/ > d69ced47023c52078854e96bcdfa6ec3675251ec/git/fileviewgitplugin.cpp#L176 > > The git status command generates a lockfile automatically. > So in a way, by changing the folder you "manually" perform a git operation > (unconsciously). > > git status is locking because it is caching the status in the repository. > It cannot be disabled in git. > > We could try to use the workaround number 2 of > https://stackoverflow.com/questions/27706108/git-do-not-create-index-lock- > for-read-only-operations Nopeinger would you care to try your hand at a patch to Dolphin to not use a lock file while doing read-only operations? A possibly relevant merge request was started @ https://invent.kde.org/sdk/dolphin-plugins/-/merge_requests/19 Git commit 31f46bf7b2cee0156bd57525b2f5e78d41578d7b by Elvis Angelaccio, on behalf of Sebastian Englbrecht. Committed on 31/10/2020 at 14:15. Pushed by elvisangelaccio into branch 'master'. Git status does not generate index.lock The git option (Note: not git status) --no-optional-locks prohibits the generation of the lockfile in read-only operation, thus not blocking other e.g. manually typed commands. https://bugs.kde.org/show_bug.cgi?id=363576 M +1 -1 git/fileviewgitplugin.cpp https://invent.kde.org/sdk/dolphin-plugins/commit/31f46bf7b2cee0156bd57525b2f5e78d41578d7b |