在 macOS Big Sur 上的 git 受控目录中使用原子编辑器重命名文件

Renaming files with atom editor in git controlled directories on macOS Big Sur

cd ~/tmp
mkdir a b
touch a/foo b/foo
cd b
git init

现在在每个目录中打开 atom,尝试将 foo 重命名为 bar。在目录 a 中,它按预期工作,在 b 中,您收到错误消息 Cannot read 属性 'getPath' of undefined'。该文件仍会重命名。

atom/github/issue 964 已在 2017 年提到此错误(Git 存储库中的文件重命名)。

最近指的是issue 22720 which says the fix would be in Atom 1.59. (1.59 is still in beta)

Issue 22542 also refers to PR 22543。它包括当前 (2021) 堆栈跟踪:

TypeError: Cannot read property 'getPath' of undefined
    at /usr/lib/atom/node_modules/git-diff/lib/git-diff-view.js:131:45