Skip to content

Add Repository::getSymbolicRefTarget and Repository::getRemoteHead - #7

Merged
savetheclocktower merged 1 commit into
masterfrom
add-symbolic-ref
Jun 9, 2026
Merged

Add Repository::getSymbolicRefTarget and Repository::getRemoteHead#7
savetheclocktower merged 1 commit into
masterfrom
add-symbolic-ref

Conversation

@savetheclocktower

Copy link
Copy Markdown

The discussion in pulsar-edit/ppm#175 revealed a use for a git-utils equivalent of the shell command git symbolic-ref. I also added a getRemoteHead convenience method that, given the name of origin, returns that origin's default branch ref.

Specs were a bit tricky, but I did rely on Claude to help me create a new .git repo to use as a fixture — one whose default branch name is develop rather than master or main. Specs pass on my machine.

@idleberg

idleberg commented Jun 9, 2026

Copy link
Copy Markdown

LGTM, I'm happy to use it in my branch once merged or do you want to go about it?

@savetheclocktower
savetheclocktower merged commit 5d88cf6 into master Jun 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants