mirror of
https://github.com/neovim/neovim.git
synced 2025-12-08 15:42:52 +00:00
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:
@@ -106,7 +106,7 @@ end
|
|||||||
function M.main(opt)
|
function M.main(opt)
|
||||||
_trace = not opt or not not opt.trace
|
_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
|
-- TODO(justinmk): check $GITHUB_REF
|
||||||
local ancestor = run({'git', 'merge-base', 'origin/master', branch})
|
local ancestor = run({'git', 'merge-base', 'origin/master', branch})
|
||||||
if not ancestor then
|
if not ancestor then
|
||||||
|
|||||||
Reference in New Issue
Block a user