Re: git: detect file creator

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

 



> > Thank you very much, again, for the very useful suggestions!
> >
> > > > 1. Do you have an idea how can I list all the files **created** (not
> > > > authored / committed) by a user, so I can implement a fair characters
> > > > counting?
> > >
> > > If you want to adapt your current script perhaps --diff-filter helps,
> > > but...
> >
> > I added `--diff-filter=AR` to my original command like this:
> >
> > git log --use-mailmap --no-merges --diff-filter=AR
> > --author="CertainEditor" --name-only --pretty=format:""
> >
> > and it seems to do the job! May I have missed/messed something here?
>
> Now I see that if one editor renames(/moves) the files created by
> another editor - the former gets credits on all the characters inside
> those renamed files.
> This is bad. And it seemingly stems from the fact that in
> `--diff-filter=AR` means `A` OR `R`. Is there a way to do `A` OR (`A`
> AND `R`), meaning if a file was
> renamed then list it only if he also was created by that same author...

PS: the only way I see to approach it is to create a mechanism that
will prevent renaming
files by anyone except for the file creator (the one who Added file).
Can such a commit hook be created? If yes - how?



[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