unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.64k stars 267 forks source link

bugfix: switch to most recent branch #5100

Closed mitchellwrosen closed 1 week ago

mitchellwrosen commented 1 week ago

Overview

Fixes #5081

This bug makes switch <project> take you to the latest branch you were on in <project>, as it used to. I accidentally deleted that functionality during a sloppy refactor in w49ee64ef37fb3846d8aee8858435dc054d9992e3ere

Test coverage

I tested this change manually

ceedubs commented 1 week ago

Thanks for the fix @mitchellwrosen!

I tested this change manually

Is it that adding transcript testing for this doesn't work because transcripts assume the branch provided in the prompt? I guess that would mean you can't really test switch at all?

mitchellwrosen commented 1 week ago

Is it that adding transcript testing for this doesn't work because transcripts assume the branch provided in the prompt? I guess that would mean you can't really test switch at all?

Yes, I think that's right. If switch had any output then that could be captured in a transcript, but it doesn't.