Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ff3a3e

Browse files
committed
fix(blame): lazily fetch full commit message
That way, we will not only get the summary linecontained in the blame, but fetch the full message.This is more costly than the previous implementationallowed it to be, but being less surprising/correctcertainly is the preferred behaviour here.Fixes#485
1 parent0ed3cd7 commit2ff3a3e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

‎git/repo/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,7 @@ def blame_incremental(self, rev, file, **kwargs):
714714
authored_date=int(props[b'author-time']),
715715
committer=Actor(safe_decode(props[b'committer']),
716716
safe_decode(props[b'committer-mail'].lstrip(b'<').rstrip(b'>'))),
717-
committed_date=int(props[b'committer-time']),
718-
message=safe_decode(props[b'summary']))
717+
committed_date=int(props[b'committer-time']))
719718
commits[hexsha]=c
720719
else:
721720
# Discard the next line (it's a filename end tag)
@@ -815,8 +814,7 @@ def blame(self, rev, file, incremental=False, **kwargs):
815814
authored_date=info['author_date'],
816815
committer=Actor._from_string(
817816
info['committer']+' '+info['committer_email']),
818-
committed_date=info['committer_date'],
819-
message=info['summary'])
817+
committed_date=info['committer_date'])
820818
commits[sha]=c
821819
# END if commit objects needs initial creation
822820
ifnotis_binary:

‎git/test/test_repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def test_should_display_blame_information(self, git):
307307
assert_equal('Tom Preston-Werner',c.committer.name)
308308
assert_equal('tom@mojombo.com',c.committer.email)
309309
assert_equal(1191997100,c.committed_date)
310-
assert_equal('initial grit setup',c.message)
310+
self.assertRaisesRegexp(ValueError,"634396b2f541a9f2d58b00be1a07f0c358b999b3 missing",lambda:c.message)
311311

312312
# test the 'lines per commit' entries
313313
tlist=b[0][1]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp