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

Commit9ef07a7

Browse files
committed
Revert the removal of Commit.trailers property.
1 parented36bd9 commit9ef07a7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎git/objects/commit.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,20 @@ def stats(self) -> Stats:
335335
text=self.repo.git.diff(self.parents[0].hexsha,self.hexsha,"--",numstat=True,no_renames=True)
336336
returnStats._list_from_string(self.repo,text)
337337

338+
@property
339+
deftrailers(self)->Dict[str,str]:
340+
"""Get the trailers of the message as a dictionary
341+
342+
:note: This property is deprecated, please use either ``Commit.trailers_list`` or ``Commit.trailers_dict``.
343+
344+
:return:
345+
Dictionary containing whitespace stripped trailer information.
346+
Only contains the latest instance of each trailer key.
347+
"""
348+
return {
349+
k:v[0]fork,vinself.trailers_dict.items()
350+
}
351+
338352
@property
339353
deftrailers_list(self)->List[Tuple[str,str]]:
340354
"""Get the trailers of the message as a list

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp