There were issues with the previous change when it came to handling branches and tags. The hard reset would cause a cannot merge non-forwarded merge error when pulling to see if any changes occurred.
Instead of a reset went with a checkout that worked with the pull context, though checkout needs some massaging when handling revision. Specifically the commit hash of a tag doesnt work, thankfully you can use the tag name as a branch and everything is happy. I think I have every use case covered now, HEAD, branch name, tag, and commit. Along with ensuring that if the value changes on HEAD then that will be tracked properly.
I also verified it worked using branch names from the agent-modules repo.
PR Description
There were issues with the previous change when it came to handling branches and tags. The hard reset would cause a
cannot merge non-forwarded merge
error when pulling to see if any changes occurred.Instead of a reset went with a checkout that worked with the pull context, though checkout needs some massaging when handling revision. Specifically the commit hash of a tag doesnt work, thankfully you can use the tag name as a branch and everything is happy. I think I have every use case covered now, HEAD, branch name, tag, and commit. Along with ensuring that if the value changes on HEAD then that will be tracked properly.
I also verified it worked using branch names from the agent-modules repo.