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

More idiomatic way to fetch HEAD refs #1515

Merged
merged 1 commit into from
Jan 22, 2025
Merged

More idiomatic way to fetch HEAD refs #1515

merged 1 commit into from
Jan 22, 2025

Conversation

o2sh
Copy link
Owner

@o2sh o2sh commented Jan 20, 2025

Tried to simplify the logic by taking advantage of Gitoxide's dedicated APIs.

We only care about the head's local and remote ref.

@o2sh o2sh added the refactor label Jan 20, 2025
@o2sh o2sh requested a review from Byron January 20, 2025 23:21
Copy link
Collaborator

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Neat! Definitely also a performance improvements as one won't go through a possibly large amount of refs anymore.
The only refs collected now are the checked out reference, and its remote tracking ref (e.g. refs/remotes/origin/foo) if available.

@o2sh o2sh merged commit 6a6c9fa into main Jan 22, 2025
4 checks passed
@o2sh o2sh deleted the chore/head-refs branch January 22, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants