git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen Sinclair" <radarsat1@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] Add committer and author names to top of COMMIT_EDITMSG.
Date: Fri, 11 Jan 2008 19:09:23 -0500	[thread overview]
Message-ID: <9b3e2dc20801111609t3103af1frc23519cab43ae8be@mail.gmail.com> (raw)
In-Reply-To: <7v3at42avd.fsf@gitster.siamese.dyndns.org>

> I'd almost agree with this patch if if added AUTHOR but not
> COMMITTER, and only when AUTHOR is different from me.  That
> would help reassure anybody while amending other's changes.
> COMMITTER is always me and I should not reminded with extra
> lines that waste precious screen real estate.

The purpose of my patch was to remind _myself_ what my name is, in
case I hadn't configured it correctly.
But I can see this use case also being useful.


> And no, I did not check if your change correctly supports the
> use case of amending other's changes.  But if I recall the code
> correctly, I suspect that your change doesn't.  The recorded
> author is determined after the log message is prepared, way
> later.

Sure, that's possible.


> I strongly agree with Dscho that this change needs to be
> defended with a good description on the reason why this is good.

The patch was really to go along with my RFC about the idea.  I guess
it was too early to post a possible implementation.
(I have only just begun to look at the git code after all..)


> If the reason is "newbie protection", I do not think this is a
> good change at all.  Newbie protection is never a good reason to
> make people who graduated that state to pay extra price
> unconditionally.

I agree.  I wouldn't necessarily say it is "newbie protection", so
much as a friendly reminder of what username you are using while doing
a commit, which, as I said, might not be as expected if you have just
sat down at a new machine.  Especially if you have been using git for
a long time on a single machine, it is something you might easily
forget to configure.  (As I have, several times now.)  I agree,
however, that this it is not necessarily worth having this on the
screen every time you do a commit, for the exceptional instance where
it might be wrong.  Perhaps more usefully it could appear only if you
haven't yet created a user.email and user.name config entry.

Actually in my honest opinion, the default of using the computer's
host name and login is pretty much _never_ right, but I thought this
patch might be less intrusive than introducing a new error message.

I do have a slightly better patch now that has a more informative
message and uses git_committer_info() and git_author_info(), however
I'll wait for any more opinions before posting it.

In retrospect, I guess I could just as easily solve my problem by
introducing a post-receive hook for my personal repo that issues a
warning for commits not configured to my email address.


Steve

  reply	other threads:[~2008-01-12  0:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11 20:10 [PATCH] Add committer and author names to top of COMMIT_EDITMSG Stephen Sinclair
2008-01-11 21:26 ` Johannes Schindelin
2008-01-11 23:36 ` Junio C Hamano
2008-01-12  0:09   ` Stephen Sinclair [this message]
2008-01-12  0:22     ` Junio C Hamano
2008-01-12  1:33       ` Stephen Sinclair
2008-01-12  1:53         ` Junio C Hamano
2008-01-12  2:25           ` Stephen Sinclair
2008-01-12  4:57             ` Junio C Hamano
2008-01-12  7:26               ` Stephen Sinclair
2008-01-12  8:02                 ` Junio C Hamano
2008-01-12  4:52           ` Jeff King
2008-01-12  5:06             ` Junio C Hamano
2008-01-12  5:30               ` Junio C Hamano
2008-01-12  5:32                 ` Jeff King
2008-01-12  5:56                   ` Junio C Hamano
2008-01-12  5:58                     ` Jeff King

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=9b3e2dc20801111609t3103af1frc23519cab43ae8be@mail.gmail.com \
    --to=radarsat1@gmail.com \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).