Currently obs_scm seems to only default to branches named master but not main hence me needing to add an extra line to specify that I am targetting the main branch.
I think obs_scm should try master first and then if that fails fall back on main rather than require the user to debug what went wrong.
Instead of using an if then else fallback approach it is also possible to get the default branch by parsing orgin/HEAD
using: git rev-parse --abbrev-ref origin/HEAD
Currently obs_scm seems to only default to branches named
master
but notmain
hence me needing to add an extra line to specify that I am targetting themain
branch.I think obs_scm should try
master
first and then if that fails fall back onmain
rather than require the user to debug what went wrong.This code works:
but not this: