atom-archive / xray

An experimental next-generation Electron-based text editor
MIT License
8.48k stars 235 forks source link

Introduce WorkTree.prototype.basePathForFileId #153

Closed as-cii closed 5 years ago

as-cii commented 5 years ago

When calling openTextFile, the contents of the file as it existed in the work tree's base commit need to be provided. Previously this was difficult if the file had been renamed because there was no way to determine its original path.

With this pull request we are introducing basePathForFileId to memo_js which addresses that need. If the file was not in the base commit this method returns null.

🍐'd with @nathansobo

/cc: @probablycorey