Home > front end >  Renaming files with atom editor in git controlled directories on macOS Big Sur
Renaming files with atom editor in git controlled directories on macOS Big Sur

Time:11-03

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

Now open atom in each of the directories, try renaming foo to bar. In directory a it works as expected, in b you get error message Cannot read property 'getPath' of undefined'. The file still gets renamed.

CodePudding user response:

atom/github/issue 964 was already mentioning this error (file rename in a Git repo) in 2017.

Recently, it refers to 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. It includes the current (2021) stack trace:

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