Re: git-who

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

 




On Wed, 8 Oct 2008, Johannes Sixt wrote:
> 
> Wouldn't
> 
>    git shortlog -s -- path/to/file

I suspect "-sn" is better. It sorts by number rather than by name, and if 
you're interested in who has touched a file, you probably wants to know 
who has touched it _most_.

And as usual, the nice thing about it is that all the normal git rules 
apply, so you can do it by multiple files or subdirectories, and you can 
filter by time. And ignore merges, since they tend to be about upper-level 
maintainers than about the people doing patches.

So for the kernel, you can do something like

	git shortlog -ns --no-merges --since=6.months.ago drivers/scsi include/scsi

and see who has been doing scsi-related stuff lately.

Of course, when it comes to relevance, it may be more interesting to just 
look at 'git blame' output, and then you're limited to single files at a  
time. And performance is going to be a problem, especially if you enable 
movement detection. 

But we don't have anything special for that. You can do it with something 
like

	git blame -M -w kernel/sched.c |
		grep -v '^^' |
		cut -d'(' -f2- |
		cut -c1-20 |
		sort |
		uniq -c |
		sort -n

which will ignore the root commit (so as not to give me all the credit for 
old history), but it would probably be better (but more complex - need 
perl or some other "real" language with associative arrays etc to remember 
the commit information) to parse the output of "git blame --incremental" 
instead.

		Linus
--
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]

  Powered by Linux