-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show methods for Signatures and Commits #19951
Conversation
function Base.show(io::IO, c::GitCommit) | ||
authstr = sprint(show, author(c)) | ||
cmtrstr = sprint(show, committer(c)) | ||
print(io, "Commit Author: $authstr\nCommitter: $cmtrstr\nMessage:\n$(message(c))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe print the hash as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
69e0908
to
deb6a9b
Compare
function Base.show(io::IO, c::GitCommit) | ||
authstr = sprint(show, author(c)) | ||
cmtrstr = sprint(show, committer(c)) | ||
print(io, "Commit Author: $authstr\nCommitter: $cmtrstr\nSHA: $(Oid(c))\nMessage:\n$(message(c))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oid
is now GitHash
(#19878)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it would probably be useful to print the typename, both here and the other PRs.
Add `show` methods for `Signature` and `Commit`s in LibGit2. Display the time of the commit using Julia's built-in date handling.
deb6a9b
to
be99ce9
Compare
Updated! |
Add
show
methods forSignature
andCommit
s in LibGit2.Display the time of the commit using Julia's built-in date handling.
Re: #19839