๐ History Inspector is empty if the git repo doesn't have a remote defined
simonwhitaker opened this issue ยท comments
Description
If I open a folder in CodeEdit that is under version control with Git, but which doesn't have a remote, the History Inspector view for any file is empty.
To Reproduce
- Create a local test repo:
mkdir test && cd test git init . echo Hello world > test.txt git commit -am "First commit"
- Open the folder you created in CodeEdit
- Open test.txt
- Open the Inspector view and select the History Inspector tab
Expected Behavior
I should see a single commit for test.txt in the History Inspector
Version Information
CodeEdit: 0.1.0-dev (38)
macOS: 14.5
Xcode: 15.4
Additional Context
I'm pretty sure it's because this line is causing getCommitHistory
to throw if there's no remote defined.
Screenshots
![Screenshot 2024-06-03 at 3 14 02โฏPM](https://private-user-images.githubusercontent.com/116432/336107175-ad6bbabb-3449-48b8-b903-9fb488a14558.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2NzgzNzYsIm5iZiI6MTcyNDY3ODA3NiwicGF0aCI6Ii8xMTY0MzIvMzM2MTA3MTc1LWFkNmJiYWJiLTM0NDktNDhiOC1iOTAzLTlmYjQ4OGExNDU1OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyNlQxMzE0MzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNGQ3NjE4NGJmNDg3MjljZmU4OGZmMzU2ZTAwMDhlMGFiZmEyMDQyMDljNjY4ZjlhZjY1NTMzYzAwYWFkNTQxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.19zm6IChEn84CLjw3KylKfmPeuchLItBuVKY2RFMbg8)
Is this issue what you are referring to here?
Edit: I see that it is not. But it is somewhat related. We just need to handle this better in both scenarios.