A list of recent changes to the entire file by a collection of users

Question: Given the git repository, show the files modified by a specific set of users, as well as the latest editor (from this set of users) of these files.

Potential solution:

git ls-files | xargs -n 1 git log -1 --author="example.com" --name-only --pretty=format:'%aN' --follow -p | paste -d";" - - 

This will give the desired result (below), but slow:

 <author_a>;<file_a> <author_b>;<file_b> <author_b>;<file_c> ... 

Is there a faster / better way to do this?

+5
source share
1 answer

You can make alias to keep you typing or copying this line.

To make alias , you simply add alias with the git alias command or paste it directly into the .gitconfig file

Another thing you can do is change this script to select the format you want and add it to your path., Then add an alias to this script in your git configuration.

for example if you want to call it git l

  = "!bash -c 'source ~/.githelpers && pretty_git_log'" 
+2
source

Source: https://habr.com/ru/post/1210744/


All Articles