Re: [PATCH v6 00/13] several notes refs, post-rewrite, notes rewriting
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:24
Thomas Rast [off-list ref] writes:
I'm not aware of comments by anyone else, so if I missed them please point them out.
Yes, please ;-)
quoted
- "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.[...]quoted
- 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.