Re: link user-name with ssh-login

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 19, 2012 at 13:57, Jeff King <peff@xxxxxxxx> wrote:
> On Mon, Mar 19, 2012 at 12:15:07PM -0700, Junio C Hamano wrote:
>
>> A pre-receive hook that lists the author names of the commits, along the
>> lines of "git log --format='%an <%ae>' $OLD_HEAD..$NEW_HEAD" and compares
>> against the name of the user authenticated against your SSH server would
>> be a way to do this.
>>
>> But that would mean you are forbidding people to accept patches from
>> others, inspect the patches for validity and vouch for them, while giving
>> the credit to them by recoding the author names of the patch authors.
>>
>> Perhaps checking the committer name would suit your situation better.  I
>> dunno.
>
> Then you would be forbidding merges of other people's work, no? Even if
> the other person's commits are available in the upstream repo, they
> might be hitting this ref for the first time, and would be generally be
> checked by such a hook.

Most hooks that are trying to do this use "$NEW_HEAD --not --all" to
only examine commits that would be newly reachable. Already reachable
commits are presumed valid. If you want to merge someone else's
commits, just make sure they have already pushed their commits to a
branch somewhere, like a refs/heads/$USER/ sandbox space or something.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]