git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Glasser <glasser@davidglasser.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: Keep original author with git merge --squash?
Date: Thu, 12 Feb 2015 12:53:33 -0800	[thread overview]
Message-ID: <CAN7QDoLKFBCJpFa+QL8dPQtwyAyDNt-ck_sNJ3fS+vTrK_Lg9w@mail.gmail.com> (raw)
In-Reply-To: <xmqqpp9erihg.fsf@gitster.dls.corp.google.com>

On Thu, Feb 12, 2015 at 12:18 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Jeff King <peff@peff.net> writes:
>
>> On Wed, Feb 11, 2015 at 09:21:04AM -0800, David Glasser wrote:
>>
>>> (I'm not sure if this should be a flag to --squash or to commit.
>>> Maybe `git merge --squash`; `git commit --use-squashed-author`?  Seems
>>> like it should be not too hard to implement; SQUASH_MSG is pretty
>>> parseable.  Or just a config value.)
>>
>> It sounds like "git commit -c" is close to what you want, which will
>> pull the author and commit message from a particular commit. But I don't
>> think there is a convenient way to name the commit in your case (it is
>> likely to be the first commit on the branch you are squash-merging, but
>> there isn't a shorthand for that).
>
> I thought David was primarily interested in the case where a branch
> authored by a single person, so specifying the tip of the branch
> being "merged" would be sufficient, no?

Well, using -c appears to override SQUASH_MSG entirely; it replaces
the message as well as the author.  Often I do want to make my own
message based on all the messages provided by the submitter.  (And
typically the branch's tip is the least useful message anyway: it's
usually something like "respond to code review".)

--dave


-- 
glasser@davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/

  reply	other threads:[~2015-02-12 20:53 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 [this message]
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
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=CAN7QDoLKFBCJpFa+QL8dPQtwyAyDNt-ck_sNJ3fS+vTrK_Lg9w@mail.gmail.com \
    --to=glasser@davidglasser.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.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 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).