Reputation: 17913
Suppose I would like to find commits by a certain contributor in the Linux Kernel. https://github.com/torvalds/linux/commits/master
For example, there is a recent commit authored by Anna Schumaker (I took the most recent commit in the current history that is not authored by a github account).
Some other SO questions on the topic suggest using https://github.com/torvalds/linux/commits/master?author=AUTHOR
to find more commits by the same author.
However:
Is this a missing feature in Github? Am I doing it wrong?
P.S. I am aware of ways to accomplish this using git command-line tools. I am specifically looking for ways to do this with Github, because I'd like to be able to produce a link to the search so someone else can look at the results on the web.
Upvotes: 0
Views: 186
Reputation: 113355
You can pass in the author
parameter the username or the email address. As you noticed, using ?author=torvalds
gives you the commits.
Since Anna doesn't have a GitHub account, you can use her email. But how to find her email knowing the commit?
Having the commit url (which looks like this: https://github.com/torvalds/linux/commit/39d0d3bdf7bab3021a31e501172ac0f18947f9b3
), append the .patch
snippet at the end. You should get something like this:
https://github.com/torvalds/linux/commit/39d0d3bdf7bab3021a31e501172ac0f18947f9b3.patch
The response looks like this:
From 39d0d3bdf7bab3021a31e501172ac0f18947f9b3 Mon Sep 17 00:00:00 2001
From: Anna Schumaker <[email protected]>
Date: Mon, 5 Oct 2015 16:43:26 -0400
Subject: [PATCH] NFS: Fix a tracepoint NULL-pointer dereference
Running xfstest generic/013 with the tracepoint nfs:nfs4_open_file
enabled produces a NULL-pointer dereference when calculating fileid and
filehandle of the opened file. Fix this by checking if state is NULL
before trying to use the inode pointer.
Reported-by: Olga Kornievskaia <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
---
fs/nfs/nfs4trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 28df12e..671cf68 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -409,7 +409,7 @@ DECLARE_EVENT_CLASS(nfs4_open_event,
__entry->flags = flags;
__entry->fmode = (__force unsigned int)ctx->mode;
__entry->dev = ctx->dentry->d_sb->s_dev;
- if (!IS_ERR(state))
+ if (!IS_ERR_OR_NULL(state))
inode = state->inode;
if (inode != NULL) {
__entry->fileid = NFS_FILEID(inode);
You see in the second line that you have the author name and email address. Now, knowing the email address, you can fetch person's commits in that repository:
https://github.com/torvalds/linux/[email protected]
Upvotes: 5
Reputation: 17913
Well, time and again, the best way to solve a problem is to publicly proclaim that I don't know how to solve it... Immediately after posting the question I realized I haven't tried searching for just the email:
https://github.com/torvalds/linux/commits/[email protected]
gives the expected results.
Upvotes: 0