Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Git history in the History Inspector, even when a remote is not configured #1744

Merged

Conversation

simonwhitaker
Copy link
Contributor

@simonwhitaker simonwhitaker commented Jun 3, 2024

Description

The previous method of determining the remote URL for a git commit would throw if no remote was configured. This led to the History Inspector panel being empty if the file being edited was under version control with Git but did not have a remote configured.

This PR makes the check for a remote non-fatal if a remote is not configured, setting the remoteURL property of a GitCommit to nil instead.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screenshot 2024-06-03 at 2 29 52 PM

@simonwhitaker simonwhitaker force-pushed the 1743-git-history-with-no-remote branch from 287e077 to 0555dfd Compare June 6, 2024 06:13
Copy link
Collaborator

@thecoolwinter thecoolwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@austincondiff austincondiff merged commit 1e7b9ce into CodeEditApp:main Jun 8, 2024
2 checks passed
@simonwhitaker simonwhitaker deleted the 1743-git-history-with-no-remote branch June 11, 2024 14:54
@thecoolwinter thecoolwinter added the bug Something isn't working label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 History Inspector is empty if the git repo doesn't have a remote defined
3 participants