From 98a53aa3990a6a7730bb15d27e215d3163485ac2 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 26 Mar 2020 22:47:07 +0100 Subject: [PATCH] Follow renames when looking for the creation of a file Signed-off-by: Gilles Peskine --- scripts/assemble_changelog.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/assemble_changelog.py b/scripts/assemble_changelog.py index 6eeea61243..50e912881b 100755 --- a/scripts/assemble_changelog.py +++ b/scripts/assemble_changelog.py @@ -260,7 +260,9 @@ class EntryFileSortKey: 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