Skip to content

Conversation

MggMuggins
Copy link
Contributor

@MggMuggins MggMuggins commented Feb 14, 2025

You can totally just create random references under .git/refs, this allows them to be rendered (in orange).

This also only draws HEAD when it points to a valid reference (rather than the previous behavior which left a weird floating HEAD -> refs/heads/main).

TODOs:

  • Correctly identify & draw virtual references (any ref can point to another ref, not just HEAD)
  • Debug detached head state? (Unknown if this is a bug)
  • Other special references like CHERRY_PICK_HEAD

@gorhawk Just finished my second talk on git using this tool; kudos on this again, I've had fun working with it.

This also only draws HEAD when it points to a valid reference
git 2.43.0 uses the commit hash in .git/HEAD instead of `ref: ` syntax
when checking out tags, so this only needs to consider commits.
@MggMuggins MggMuggins requested a review from gorhawk June 26, 2025 02:25
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