sanitize-commit: recognize main as the development branch


The pickbot "on dev" test only knows dev and master. Branch discovery
drops any other non-numeric head, so in a repository whose development
branch is named main every commit looked like a commit on a release
branch: it was nagged with "Omission of Pick-to footer is probably
incorrect", a "Pick-to: main" footer was rejected as not a valid branch,
and the Pick-to hints named master, which does not exist there.

Keep main heads in branch discovery and use main as the development
branch when neither dev nor master exists. Repositories with dev or
master are unaffected; there main remains an ordinary branch.

Change-Id: If0e052a6afe60457a014f2bce802144aa23cd6bf
Reviewed-by: Daniel Smith <daniel.smith@qt.io>
commit2c41b5303ffb7dde77b1c7ce8ed48bb8c8efb1e1
parent28b9e80683d24c0e6d22c7b061d0a8a1c2a5fc3a
authorDaniel Smith <daniel.smith@qt.io>
committerDaniel Smith <daniel.smith@qt.io>
commit timeFri, 16 Oct 2026 09:29:58 +0000