Skip to content

Commit 9aa6215

Browse files
committed
review
1 parent b84749b commit 9aa6215

3 files changed

Lines changed: 6 additions & 12 deletions

File tree

‎test/test_repo.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def test_blame_preserves_line_content(self):
774774
self.assertEqual(lines, ["alpha ", "beta", "\t", "crlf\r", "gamma"])
775775

776776
def test_blame_preserves_timezones(self):
777-
with fixture_repo("blame-timezones.sh") as repo:
777+
with fixture_repo("blame-content.sh") as repo:
778778
for incremental in (False, True):
779779
for rev in ("HEAD", None):
780780
with self.subTest(incremental=incremental, rev=rev):

‎tests/fixtures/blame-content.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ cd repo
66
# CRLF line survive fixture creation on every platform.
77
blob=$(printf 'alpha \nbeta\n\t\ncrlf\r\ngamma\n' | git hash-object -w --stdin)
88
tree=$(printf '100644 blob %s\tfile.txt\0' "$blob" | git mktree -z)
9-
commit=$(git -c user.name=A -c user.email=a@example.com commit-tree "$tree" -m content)
9+
commit=$(GIT_AUTHOR_DATE='2020-01-01T12:00:00+0530' \
10+
GIT_COMMITTER_DATE='2020-01-01T13:00:00-0400' \
11+
git -c user.name=A -c user.email=a@example.com commit-tree "$tree" -m content)
1012
git update-ref refs/heads/main "$commit"
13+
git reset --hard -q HEAD
14+
printf 'changed\n' > file.txt

‎tests/fixtures/blame-timezones.sh‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)