aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/Format.cmake4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmake/Format.cmake b/cmake/Format.cmake
index 7e8ca3547d..7097e5766f 100644
--- a/cmake/Format.cmake
+++ b/cmake/Format.cmake
@@ -1,15 +1,13 @@
# Returns a list of all files that has been changed in current branch compared
# to master branch. This includes unstaged, staged and committed files.
function(get_changed_files outvar)
- set(default_branch master)
-
execute_process(
COMMAND git branch --show-current
OUTPUT_VARIABLE current_branch
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
- COMMAND git merge-base ${default_branch} ${current_branch}
+ COMMAND git merge-base master HEAD
OUTPUT_VARIABLE ancestor_commit
OUTPUT_STRIP_TRAILING_WHITESPACE)