Author, Committer and Pusher can be different person in Git, but git didn't store the pusher's information in logs.
So, How do i get it?
You don't.
The upstream repo doesn't make any assumption about who is providing commit: it can be through email, a diff patch copied on a USB key, and other various transfer protocol.
Some of those protocols (ssh, https) might have in their logs the information you seek, but:
gitolite-admin
repo can be anything you want, and not related to a real name.As Linus mentions (in "Why do some open source projects do not accept pull requests, but emailing patch files only?"):
since github identities are random, I expect the pull request to be a signed tag, so that I can verify the identity of the person in question.
So if you want, as someone pushing some commits, to vouch for the integrity of the all repo, you can make and sign a tag on the HEAD
of what is being pushed, in order for the upstream repo to consider you as, not exactly the "pusher", but the one validating what has been pushed
If the push is happening over SSH, you may be able to use the USER
environment variable. (This will also work for local pushes, of course.) This depends, of course, on whether the user that is used for SSH login is distinct for different users of your system - this isn't the case with gitolite, for example. (However, gitolite will define the GL_USER
environment variable to identify the pusher.) For HTTP, you can try the REMOTE_USER
environment variable.
Update: In general, this information isn't terribly interesting compared to the author and committer of the commits - it's always a surprise to me, for example, that GitHub displays the user who did particular pushes at all...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With