From: Junio C Hamano <gitster@pobox•com>
To: David Glasser <glasser@davidglasser•net>
Cc: Jeff King <peff@peff•net>, git@vger•kernel.org
Subject: Re: Keep original author with git merge --squash?
Date: Thu, 12 Feb 2015 14:34:43 -0800 [thread overview]
Message-ID: <xmqq4mqqrc70.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAN7QDoJ+hOFqoc54sAbLeSxvj8TQKQRSVKbNQXZYfPv1uOy=WA@mail.gmail.com> (David Glasser's message of "Thu, 12 Feb 2015 14:16:25 -0800")
David Glasser <glasser@davidglasser•net> writes:
> So to be concrete: What I'm proposing (and I'm excited to implement
> it!) is the following:
>
> When running "git commit" and:
> - You've fallen into the case where the message was read from SQUASH_MSG
> - You haven't used another method of specifying the author (--author,
> -C, -c, --amend)
> - You have not specified --reset-author
> - You have set the "commit.useSquashAuthor" option
> - Before invoking prepare-commit-msg, all of the `Author:` lines found
> in SQUASH_MSG have the same value
>
> then that author is used, as if it were specified with --author. (And
> this will show up, commented-out, at the bottom of COMMIT_EDITMSG.)
I actually was hoping that this would extend to cases other than
"git merge --squash".
When running "git commit" and:
- You didn't use a more explicit method of specifying the
authorship identity (--author, --date, -C, -c --amend,
--reset-author options, or environment variables GIT_AUTHOR_*);
- You have commit.useAuthorFromEditorComment variable;
- You have "# Author: " line that are identical in the result of
the editor,
then use that author. That would allow "git commit --amend" to
update a misspelled author name, for example.
Is that a bit too liberal? Would it invite mistakes?
next prev parent reply other threads:[~2015-02-12 22:34 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 [this message]
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
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=xmqq4mqqrc70.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=glasser@davidglasser$(echo .)net \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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