zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
604 stars 71 forks source link

[BUG] GitToolBox doesn't respect git local config `blame.ignoreRevsFile` option #448

Closed retyui closed 1 year ago

retyui commented 1 year ago

Describe the bug

I tried the next article approach https://michaelheap.com/git-ignore-rev/

To Reproduce

  1. Go to root repo
  2. Create file .git-blame-ignore-revs
  3. Add commits that should ignored to file abve
  4. Run git config blame.ignoreRevsFile .git-blame-ignore-revs
  5. Open IDE 7 reset cache
  6. IMPORTANT IDE should be use non root folder:
├── be
│   └── ruby_code
├── fe // <-- open IDE project in this folder
│   ├── node_modules
│   ├── package.json
│   └── yarn.lock
├── .git
│   └── config
└── .git-blame-ignore-revs

Expected behavior

Inline blame should exclude that commit (as git blame do)

Plugin version

213.10.5

IDE version

WebStorm 2022.3
Build #WS-223.7571.168, built on November 28, 2022
Licensed to Mur Amur
Subscription is active until November 14, 2023.
Runtime version: 17.0.5+1-b653.14 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-60-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 1978M
Cores: 12
Registry:
    debugger.new.tool.window.layout=true
    ide.experimental.ui=true

Non-Bundled Plugins:
    com.github.copilot (1.2.0.2322)
    izhangzhihao.rainbow.brackets (2023.1.1)

Current Desktop: X-Cinnamon

Screenshots

git blame

image

IDE

Prettier commit has to be disregarded.

image

zielu commented 1 year ago

This must have broken when persistent blame cache was introduced, previously it was enough to restart. Reseting cache did not help because #337 is not implemented, so blame cache is not cleared and holds outdated commit info

I'll add proper cache clearing first as a workaround and next full support for ignoreRevs

zielu commented 1 year ago

Manual cache invalidation ready: https://github.com/zielu/GitToolBox/wiki/Manual#cache-invalidation

zielu commented 1 year ago

453 tracks proper support implementation

retyui commented 1 year ago

thanks