Follow renames when looking for the creation of a file
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/scripts/assemble_changelog.py b/scripts/assemble_changelog.py
index 6eeea61..50e9128 100755
--- a/scripts/assemble_changelog.py
+++ b/scripts/assemble_changelog.py
@@ -260,7 +260,9 @@
Return None if the file was never checked into git.
"""
- hashes = subprocess.check_output(['git', 'log', '--format=%H', '--', filename])
+ hashes = subprocess.check_output(['git', 'log', '--format=%H',
+ '--follow',
+ '--', filename])
m = re.search(b'(.+)$', hashes)
if not m:
# The git output is empty. This means that the file was