build: enable formatting during rebase

Closes https://github.com/neovim/neovim/issues/25654
This commit is contained in:
dundargoc 2023-10-23 21:03:15 +02:00 committed by dundargoc
parent 5f03a1eaab
commit 25cfe3fd43

View File

@ -1,15 +1,13 @@
# Returns a list of all files that has been changed in current branch compared # Returns a list of all files that has been changed in current branch compared
# to master branch. This includes unstaged, staged and committed files. # to master branch. This includes unstaged, staged and committed files.
function(get_changed_files outvar) function(get_changed_files outvar)
set(default_branch master)
execute_process( execute_process(
COMMAND git branch --show-current COMMAND git branch --show-current
OUTPUT_VARIABLE current_branch OUTPUT_VARIABLE current_branch
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process( execute_process(
COMMAND git merge-base ${default_branch} ${current_branch} COMMAND git merge-base master HEAD
OUTPUT_VARIABLE ancestor_commit OUTPUT_VARIABLE ancestor_commit
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)