Codegen: prepend .gitattributes entries with /

This commit is contained in:
Paolo Tranquilli
2023-05-05 10:08:44 +02:00
parent 436f2437ef
commit 95248d17d1
3 changed files with 5 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ def write_registry(file, *files_and_hashes):
def assert_registry(file, *files_and_hashes):
assert_file(file, create_registry(files_and_hashes))
files = [file.name, ".gitattributes"] + [f for f, _, _ in files_and_hashes]
assert_file(file.parent / ".gitattributes", "\n".join(f"{f} linguist-generated" for f in files) + "\n")
assert_file(file.parent / ".gitattributes", "\n".join(f"/{f} linguist-generated" for f in files) + "\n")
def hash(text):