CodeEditApp / CodeEdit

CodeEdit App for macOS โ€“ Elevate your code editing experience. Open source, free forever.

Home Page:https://codeedit.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐Ÿž 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

  1. Create a local test repo:
    mkdir test && cd test
    git init .
    echo Hello world > test.txt
    git commit -am "First commit"
    
  2. Open the folder you created in CodeEdit
  3. Open test.txt
  4. 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

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.