Re: [PATCH v6 00/13] several notes refs, post-rewrite, notes rewriting
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 10, 2010, 21:23 UTC
- Message-ID
- <7vwrxjrhue.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <cover.1268229087.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
> I'm not aware of comments by anyone else, so if I missed them please > point them out.
Yes, please ;-)
Show 14 quoted lines
>> - "git notes add" and friends honor GIT_COMMITER_* and GIT_AUTHOR_* as >> usual. Since I use post-applypatch hook to record the message-id from >> "git am", I ended up getting my notes written by original submitters. > [...] >> - As to the determination of committer/author identity, I think what the >> code currently does (i.e. honor the environment and user.* config) is >> perfectly sane, but at the same time I think it would be surprising for >> unsuspecting users. We may want to advise users about this in the >> documentation. > > I added a small patch that writes this and the history recording down > in git-notes(1). However, I'm hesitating to directly say "and this > will bite you if you use it in post-applypatch"; isn't the latter an > implementation detail of git-am?
Probably. We haven't documented what can and cannot be used by pre- and post- applypatch, but I think at least post-applypatch should not rely on the authorship information exported from the caller; if it wants to find out, it can parse HEAD, and because it is a post-hook, it should always be correct no matter how git-am implementation will change in the future.