Jeff King [off-list ref] writes:
On Wed, Feb 11, 2015 at 09:21:04AM -0800, David Glasser wrote:
quoted
(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?
On Thu, Feb 12, 2015 at 12:18 PM, Junio C Hamano [off-list ref] wrote:
Jeff King [off-list ref] writes:
quoted
On Wed, Feb 11, 2015 at 09:21:04AM -0800, David Glasser wrote:
quoted
(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/