Migrate from blame to history scoped blame am: adef809ab8
Original change: https://googleplex-android-review.googlesource.com/c/platform/prebuilts/checkstyle/+/12129282
Change-Id: I73e8830d56b9f10ab4ba1e801d261acd98692992
diff --git a/gitlint/git.py b/gitlint/git.py
index 9d796f6..e55aa06 100644
--- a/gitlint/git.py
+++ b/gitlint/git.py
@@ -126,7 +126,7 @@
# Split as bytes, as the output may have some non unicode characters.
blame_lines = subprocess.check_output(
- ['git', 'blame', commit, '--porcelain', '--', filename]).split(
+ ['git', 'blame', (commit + '^!'), '--porcelain', '--', filename]).split(
os.linesep.encode('utf-8'))
modified_line_numbers = utils.filter_lines(
blame_lines,