summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2019-02-25 12:21:36 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2019-02-25 13:14:13 -0500
commit4dbea5ed56d85b291fdf373a4100fce17704229b (patch)
tree8b26abf3d0ef8a0af493f310ee5808e9e5965f83
parent31a22be1ad2db8e5ea1688e9f51e4932c013e5ec (diff)
downloadmongo-4dbea5ed56d85b291fdf373a4100fce17704229b.tar.gz
SERVER-39309 - Fix linter calls to get_merge_base
-rwxr-xr-xbuildscripts/clang_format.py2
-rw-r--r--buildscripts/linter/git.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/buildscripts/clang_format.py b/buildscripts/clang_format.py
index 2666efead5b..477b4750d99 100755
--- a/buildscripts/clang_format.py
+++ b/buildscripts/clang_format.py
@@ -403,7 +403,7 @@ def reformat_branch( # pylint: disable=too-many-branches,too-many-locals,too-ma
(commit_prior_to_reformat))
# We assume the target branch is master, it could be a different branch if needed for testing
- merge_base = repo.get_merge_base("master")
+ merge_base = repo.get_merge_base(["HEAD", "master"])
if not merge_base == commit_prior_to_reformat:
raise ValueError(
diff --git a/buildscripts/linter/git.py b/buildscripts/linter/git.py
index d1c5b4bfad1..3ed0725ed43 100644
--- a/buildscripts/linter/git.py
+++ b/buildscripts/linter/git.py
@@ -105,7 +105,7 @@ class Repo(_git.Repository):
# 2. Cached/Staged files (--cached)
# 3. Working Tree files git tracks
- fork_point = self.get_merge_base(origin_branch)
+ fork_point = self.get_merge_base(["HEAD", origin_branch])
diff_files = self.git_diff(["--name-only", "%s..HEAD" % (fork_point)])
diff_files += self.git_diff(["--name-only", "--cached"])