Skip to content

Commit 43e2bc9

Browse files
committed
scripted-diff: Use correct name of the default branch
-BEGIN VERIFY SCRIPT- sed -i "s/master/main/g" $(git ls-files -- test/lint/*.py) -END VERIFY SCRIPT-
1 parent d2d19a4 commit 43e2bc9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/lint/lint-git-commit-check.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def main():
4141
if args.prev_commits:
4242
commit_range = "HEAD~" + args.prev_commits + "...HEAD"
4343
else:
44-
# This assumes that the target branch of the pull request will be master.
45-
merge_base = check_output(["git", "merge-base", "HEAD", "master"], text=True, encoding="utf8").rstrip("\n")
44+
# This assumes that the target branch of the pull request will be main.
45+
merge_base = check_output(["git", "merge-base", "HEAD", "main"], text=True, encoding="utf8").rstrip("\n")
4646
commit_range = merge_base + "..HEAD"
4747
else:
4848
commit_range = os.getenv("COMMIT_RANGE")

test/lint/lint-whitespace.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ def main():
9292
if args.prev_commits:
9393
commit_range = "HEAD~" + args.prev_commits + "...HEAD"
9494
else:
95-
# This assumes that the target branch of the pull request will be master.
96-
merge_base = check_output(["git", "merge-base", "HEAD", "master"], text=True, encoding="utf8").rstrip("\n")
95+
# This assumes that the target branch of the pull request will be main.
96+
merge_base = check_output(["git", "merge-base", "HEAD", "main"], text=True, encoding="utf8").rstrip("\n")
9797
commit_range = merge_base + "..HEAD"
9898
else:
9999
commit_range = os.getenv("COMMIT_RANGE")

0 commit comments

Comments
 (0)