Steps to reproduce:
- Create a branch e.g. STABLE and merge some commits to it, which aren't present on master.
- cd to your deployment dir
- git checkout STABLE
- scap deploy "doing something sketchy"
You'll see that the log messages report the correct (stable) revision, but scap attempts to check out the head of master on target nodes.
From /srv/deployment/ores/deploy-cache/cache * [new branch] master -> origin/master fatal: reference is not a tree: b4f2b0249a60754cfa4e18650fdd45c62ef4a09a
That's all wrong, that is the head of master.
To workaround, I can run: scap -r STABLE "not so sketchy"