All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sim Tov <smntov@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: git: detect file creator
Date: Thu, 21 Jul 2022 23:11:44 -0700	[thread overview]
Message-ID: <xmqqpmhxd6cf.fsf@gitster.g> (raw)
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.

      reply	other threads:[~2022-07-22  6:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 12:39 git: detect file creator Sim Tov
2022-07-15 13:22 ` Ævar Arnfjörð Bjarmason
2022-07-16 21:38   ` Sim Tov
2022-07-18 20:12     ` Sim Tov
2022-07-18 20:40       ` Sim Tov
2022-07-22  6:11         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpmhxd6cf.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=smntov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.