ci: allow older git versions when using lintcommit

More specifically, use "git rev-parse --abbrev-ref HEAD" instead of "git
branch --show-current" to get current branch.
This commit is contained in:
Dundar Göc committed 2021-10-14 10:13:56 +02:00
1 parent 6b9cb665fa
commit 35c13620a1
1 file changed
+1 -1
+1 -1
View File
@@ -106,7 +106,7 @@ end
function M.main(opt)
_trace = not opt or not not opt.trace
local branch = run({'git', 'branch', '--show-current'}, true)
local branch = run({'git', 'rev-parse', '--abbrev-ref', 'HEAD'}, true)
-- TODO(justinmk): check $GITHUB_REF
local ancestor = run({'git', 'merge-base', 'origin/master', branch})
if not ancestor then