After calling mybranch.checkout() the HEAD ref is unaffected. HEAD should always point to the latest commit in the current branch (unless in detached head mode).
The HEAD ref should always point to the latest commit in the current branch (unless in detached head mode). Anyone using git would expect HEAD to be set after a checkout.
Context
Which library is impacted? @gitgraph/core
Which version of the library is it? Latest code in master branch
What browser and version is impacted? N/A
Additional information
The code for commit is here - it doesn't update HEAD. The only time HEAD is updated is when committing (see here).
After calling
mybranch.checkout()
theHEAD
ref is unaffected. HEAD should always point to the latest commit in the current branch (unless in detached head mode).To Reproduce
https://codepen.io/richtea43/pen/abOdRzr?editors=0010
Expected behavior
The HEAD ref should always point to the latest commit in the current branch (unless in detached head mode). Anyone using git would expect HEAD to be set after a checkout.
Context
@gitgraph/core
Additional information
The code for commit is here - it doesn't update HEAD. The only time HEAD is updated is when committing (see here).