luci.mk: rework logic to determine current branch
authorJo-Philipp Wich <jo@mein.io>
Sat, 10 Sep 2022 12:54:25 +0000 (14:54 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 24 Oct 2022 23:03:36 +0000 (01:03 +0200)
commit447e362f0b56e5efdc2737899831297901736a0e
treecbf6a18bc68b7e3e0342f9f2c99cf67423336e1f
parent5c5f4a8d1f4560b5c0ac90402f5f957b166c96a3
luci.mk: rework logic to determine current branch

In case `git branch --remote` yields no result, fall back to `git branch`
without `--remote` since it is possible that the local branch has not
been pushed yet.

Also simplify extraction of the branch name by not passing `--verbose`
and utilizing variable substitutions instead of sed expressions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
luci.mk