From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: David Glasser <glasser@davidglasser.net>, git@vger.kernel.org
Subject: Re: Keep original author with git merge --squash?
Date: Fri, 13 Feb 2015 14:55:28 -0500 [thread overview]
Message-ID: <20150213195528.GA15107@peff.net> (raw)
In-Reply-To: <xmqq1tltobgy.fsf@gitster.dls.corp.google.com>
On Fri, Feb 13, 2015 at 11:30:53AM -0800, Junio C Hamano wrote:
> > This case collapses nicely if we make a slight tweak to your proposed
> > behavior (or maybe this is what you meant). If there are multiple
> > authors listed, we behave as if none was listed. That would leave the
> > authorship as it behaves today (with the author of the first commit) if
> > you do nothing, or you can override it by dropping all but one.
>
> I actually was (and am still) wondering that "silently ignore all of
> them if there are multiple ones that contradict with each other" is
> a bad idea, and that was why the last item on the "possible
> alternatives" list was to error out and ask clarification.
Normally I like "error out and ask the user" as an approach to avoiding
mistakes, but I can think of two bad side effects:
1. If we pre-populate the "# Author:" lines in "git merge --squash",
then if I run "git commit" on the result and don't explicitly take
an action to clean up those comment fields, I get an error. That's
kind of annoying.
2. Dumping the user out of "git commit" with an error isn't very
elegant. They may have put significant work into writing the commit
message. It's saved there in COMMIT_EDITMSG, but what is the easy
path to them repeating their action where they left off?
It seems like the potential for confusion comes from the same place as
my complaint (1) above: the implicit-ness of the "# Author:" lines (git
writes them, assumes you've looked at and manipulated them to your
liking, and then reads them back in).
What if there was a step required of the user to say "really, I want to
use this one"? Like converting s/Author/Set-Author/, or taking away the
"#" comment character (though that has its own confusions, as you noted
earlier).
-Peff
next prev parent reply other threads:[~2015-02-13 19:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 17:21 Keep original author with git merge --squash? David Glasser
2015-02-12 9:28 ` Jeff King
2015-02-12 11:35 ` Michael Haggerty
2015-02-12 12:12 ` Jeff King
2015-02-12 18:42 ` David Glasser
2015-02-12 20:18 ` Junio C Hamano
2015-02-12 20:53 ` David Glasser
2015-02-12 21:23 ` Junio C Hamano
2015-02-12 22:16 ` David Glasser
2015-02-12 22:19 ` David Glasser
2015-02-12 22:34 ` Junio C Hamano
2015-02-12 22:50 ` Jeff King
2015-02-12 23:32 ` Junio C Hamano
2015-02-13 7:10 ` Jeff King
2015-02-13 19:30 ` Junio C Hamano
2015-02-13 19:55 ` Jeff King [this message]
2015-02-13 0:17 ` David Glasser
2015-02-13 0:21 ` David Glasser
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=20150213195528.GA15107@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=glasser@davidglasser.net \
/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.