Re: git: detect file creator
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 22, 2022, 06:11 UTC
- Message-ID
- <xmqqpmhxd6cf.fsf@gitster.g>
- In-Reply-To
- <CA+X_a+zd52cB2h9txxxUeNV0t5s4-ARj+ApDb2+q=MYrY4-dwg@mail.gmail.com>
Sim Tov <smntov@gmail.com> writes:
> 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?
As Git is distributed, local hooks cannot fundamentally be used as an enforcement mechanism.
How about running "git blame" on the end-result, with -C/-M turned on, instead of paying too much attention to file creation? That way, at least you can trace who contributed the words on each line.