git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Santi Béjar" <sbejar@gmail.com>,
	git@vger.kernel.org, "Alex Riesen" <raa.lkml@gmail.com>
Subject: Re: [PATCH 3/3] commit: Show the committer ident when is different from the parent
Date: Thu, 01 May 2008 12:02:51 -0700	[thread overview]
Message-ID: <7vd4o5zw2s.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 20080501135109.GA10135@sigill.intra.peff.net

Jeff King <peff@peff.net> writes:

> On Thu, May 01, 2008 at 10:34:44AM +0200, Santi Béjar wrote:
>
>> >  > 1) the committer ident is different from the parent
>> >  > 2) the committer ident is set automatically
>> >
>> >  Honestly, I think just "2)" is probably fine (where automatically
>> >  presumably means "from GECOS"). I see what you are trying to accomplish
>> >  with "1)", but it's so workflow specific as to be useless.
>> 
>> I don't see "1) as workflow specific, it is there to minimize the
>> number of time it is shown, ie somebody might prefer the automatic
>> ident, so as long as it does not change it is not shown.
>
> Yes, but whether it actually succeeds in minimizing is dependent on the
> workflow of the user. I.e., it works great if I tend to build on small,
> personal repositories (or topic branches), or if I tend to receive other
> people's work by patches that I commit myself. But if I am pulling from
> somebody else's repo (as many of us do from git.git), or if I use a
> shared repo with the other committers, then I am very likely to be
> building on a parent that was committed by somebody else (and
> consequently will see the committer mentioned way more often than was
> intended).

The goal of the patch as I understand it is to prevent mistakes of
committing under a wrong committer ident, isn't it?  Why does "minimizing"
come into the picture?

Once you have a good algorithm to see when to trigger the warning that the
user might be using an unintended committer identity, I do not think you
should refrain from issuing the warning when you see the offending
committer ident and whose commit you are building on top of should not
affect it.  Otherwise, the user will get the warning once (or not even get
the warning because the commit was made with a "commit -s -m 'typofix'"
one liner), and keep using the wrong ident without noticing before
building up a long chain of commits.  If the identification algorithm is
bogus, that would result in too many false hits to be annoying, and in
that case, (1) I would not apply such a bogus algorithm until it gets
into reasonable shape, (2) we would improve it after it gets applied and
if still makes noise on a hopefully rarer false positive cases, and/or (3)
the warning will be accompanied with a suggestion to explicitly use
user.name and/or user.email in the configuration file to allow the user to
squelch it.

I think the other patch about showing the author when you are committing
other's changes is a good move, by the way.

  reply	other threads:[~2008-05-01 19:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  8:47 [PATCH 0/3] Show author and/or committer in some cases Santi Béjar
2008-04-30  8:47 ` [PATCH 1/3] Preparation to call determine_author_info from prepare_to_commit Santi Béjar
2008-04-30  8:47 ` [PATCH 2/3] commit: Show author if different from committer Santi Béjar
2008-04-30  8:47 ` [PATCH 3/3] commit: Show the committer ident when is different from the parent Santi Béjar
2008-04-30 14:50   ` Jeff King
2008-04-30 15:10     ` Jeff King
2008-04-30 16:37     ` Jeff King
2008-04-30 19:23       ` Santi Béjar
2008-04-30 19:26         ` Jeff King
2008-05-01  8:34           ` Santi Béjar
2008-05-01 13:51             ` Jeff King
2008-05-01 19:02               ` Junio C Hamano [this message]
2008-05-01 22:28                 ` Jeff King
2008-05-02  9:25                   ` Santi Béjar
2008-04-30 17:52   ` Alex Riesen

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=7vd4o5zw2s.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=raa.lkml@gmail.com \
    --cc=sbejar@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 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).