How to get all authors for current state of git? -


i've been trying find authors of git project, can ask relicensing commits. figured there'd no point in contacting authors, there may have been have had code in codebase, removed. wanted contact authors commits visible in current head.

i told git log had capability, couldn't find on except like:

git log --format='%an <%ae>' 

which sort of i'd achieve except doesn't exclude authors without code in current codebase.

how can achieve this?

ianal, relicensing not sure enough have permission of authors have code in current project. after contributions / commits somehow lead current state of project.

that aside may want take @ git blame. shows line of file introduced in commit author. should closer solution of problem. maybe additional post processing awk ... | sort | uniq can rest.

however, git blame shows information single file, have repeat files in repository.

in root directory of git repository, use shell command on linux systems:

find ./ -name '*.cpp' -print0 | xargs -0 -i git blame --show-email {} | awk ' { print $3 } ' | sort | uniq 

this searches c++ source files (extension *.cpp) find , performs git blame on of files. option --show-email of git blame shows e-mail addresses instead of names, easier filter for, because names can consist of several words, while address one. awk gets third column of output, mail address. (first short commit hash, second 1 file name.) finally, sort | uniq used rid of duplicates, showing each address once.

(untested, may point in right direction.)

if want every author ever comitted repository, use

git log --format='%an <%ae>' | sort | uniq 

instead.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -