IMHO I think this is not a snapcraft bug, just a misunderstanding of how git + commits work. For a given repo at a given point in time, a branch points at a single, specific commit. So if you specify a commit and a branch, that only resolves unambiguously if you specify the same commit as what the branch is currently pointing to. I think they are mutually exclusive for snapcraft since if you specify both a branch and a commit, it's either redundant or ambiguous.
IMHO I think this is not a snapcraft bug, just a misunderstanding of how git + commits work. For a given repo at a given point in time, a branch points at a single, specific commit. So if you specify a commit and a branch, that only resolves unambiguously if you specify the same commit as what the branch is currently pointing to. I think they are mutually exclusive for snapcraft since if you specify both a branch and a commit, it's either redundant or ambiguous.