git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible feature request for merge and pull
@ 2010-07-28  1:24 Bradley Wagner
  2010-07-28  7:34 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 10+ messages in thread
From: Bradley Wagner @ 2010-07-28  1:24 UTC (permalink / raw)
  To: git

I would love to be able to use the -m flag and --log together with git
merge and pull to be able to create a custom commit message but also
include one-line summaries of each of the commits being merged/pulled.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-28  1:24 Possible feature request for merge and pull Bradley Wagner
@ 2010-07-28  7:34 ` Ævar Arnfjörð Bjarmason
  2010-07-28 20:49   ` Avery Pennarun
  0 siblings, 1 reply; 10+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-28  7:34 UTC (permalink / raw)
  To: Bradley Wagner; +Cc: git

On Wed, Jul 28, 2010 at 01:24, Bradley Wagner
<bradley.wagner@hannonhill.com> wrote:
> I would love to be able to use the -m flag and --log together with git
> merge and pull to be able to create a custom commit message but also
> include one-line summaries of each of the commits being merged/pulled.

This sort of thing has vaguely come up before, and it was mentioned
that you can just use a small script that calls git-filter-branch or
git-rebase -i.

It's easy to rewrite the commits you just pulled, having some feature
that e.g. adds a custom message to the beginning of each of them would
just impose an artificial limitation and overlap with existing (and
more powerful) functionality.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-28  7:34 ` Ævar Arnfjörð Bjarmason
@ 2010-07-28 20:49   ` Avery Pennarun
  2010-07-28 20:55     ` Bradley Wagner
  2010-07-29  1:03     ` Jeff King
  0 siblings, 2 replies; 10+ messages in thread
From: Avery Pennarun @ 2010-07-28 20:49 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Bradley Wagner, git

On Wed, Jul 28, 2010 at 3:34 AM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Wed, Jul 28, 2010 at 01:24, Bradley Wagner
> <bradley.wagner@hannonhill.com> wrote:
>> I would love to be able to use the -m flag and --log together with git
>> merge and pull to be able to create a custom commit message but also
>> include one-line summaries of each of the commits being merged/pulled.
>
> This sort of thing has vaguely come up before, and it was mentioned
> that you can just use a small script that calls git-filter-branch or
> git-rebase -i.
>
> It's easy to rewrite the commits you just pulled, having some feature
> that e.g. adds a custom message to the beginning of each of them would
> just impose an artificial limitation and overlap with existing (and
> more powerful) functionality.

If I understand correctly, the request is not to rewrite the pulled
commits, but just to produce a nice message in the newly-created merge
commit.

It sounds like --log and -m are currently incompatible, in that -m
overrides --log, and that's not the desired behaviour.  Bradley: this
is probably a relatively easy fix to make, in case you're looking to
get into some git hacking. :)

Have fun,

Avery

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-28 20:49   ` Avery Pennarun
@ 2010-07-28 20:55     ` Bradley Wagner
  2010-07-29  1:03     ` Jeff King
  1 sibling, 0 replies; 10+ messages in thread
From: Bradley Wagner @ 2010-07-28 20:55 UTC (permalink / raw)
  To: Avery Pennarun; +Cc: Ævar Arnfjörð Bjarmason, git

Avery,

On Wed, Jul 28, 2010 at 4:49 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
> On Wed, Jul 28, 2010 at 3:34 AM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> On Wed, Jul 28, 2010 at 01:24, Bradley Wagner
>> <bradley.wagner@hannonhill.com> wrote:
>>> I would love to be able to use the -m flag and --log together with git
>>> merge and pull to be able to create a custom commit message but also
>>> include one-line summaries of each of the commits being merged/pulled.
>>
>> This sort of thing has vaguely come up before, and it was mentioned
>> that you can just use a small script that calls git-filter-branch or
>> git-rebase -i.
>>
>> It's easy to rewrite the commits you just pulled, having some feature
>> that e.g. adds a custom message to the beginning of each of them would
>> just impose an artificial limitation and overlap with existing (and
>> more powerful) functionality.
>
> If I understand correctly, the request is not to rewrite the pulled
> commits, but just to produce a nice message in the newly-created merge
> commit.

Yes, that's correct.

> It sounds like --log and -m are currently incompatible, in that -m
> overrides --log, and that's not the desired behaviour.

Correct, I can't remember which overrides which but basically it's as
if you just used one of them. Also, git pull doesn't appear to take a
-m flag at all.

> Bradley: this
> is probably a relatively easy fix to make, in case you're looking to
> get into some git hacking. :)

Nice, I may check that out.

>
> Have fun,
>
> Avery
>



-- 
Hannon Hill - Put Us to the Test
bradley.wagner@hannonhill.com | http://www.hannonhill.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-28 20:49   ` Avery Pennarun
  2010-07-28 20:55     ` Bradley Wagner
@ 2010-07-29  1:03     ` Jeff King
  2010-07-29  1:21       ` Bradley Wagner
  1 sibling, 1 reply; 10+ messages in thread
From: Jeff King @ 2010-07-29  1:03 UTC (permalink / raw)
  To: Avery Pennarun
  Cc: Ævar Arnfjörð Bjarmason, Bradley Wagner, git

On Wed, Jul 28, 2010 at 04:49:11PM -0400, Avery Pennarun wrote:

> It sounds like --log and -m are currently incompatible, in that -m
> overrides --log, and that's not the desired behaviour.  Bradley: this
> is probably a relatively easy fix to make, in case you're looking to
> get into some git hacking. :)

Really? I get:

  $ mkdir repo && cd repo && git init &&
    echo content >file && git add file && git commit -m one &&
    echo content >>file && git commit -a -m two &&
    git checkout -b other HEAD^ &&
    echo content >file2 && git add file2 && git commit -m three &&
    git merge --log -m "custom message" master &&
    git show

  commit fa21035ea5f5437e8664a5d249e7ab88ee3f0e75
  Merge: d12be4a 4dc5cba
  Author: Jeff King <peff@peff.net>
  Date:   Wed Jul 28 20:50:39 2010 -0400

      custom message

      * master:
        two

which seems to be what was asked for. So is the problem just that
git-pull does not take "-m"?

-Peff

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-29  1:03     ` Jeff King
@ 2010-07-29  1:21       ` Bradley Wagner
  2010-07-29  1:27         ` Jonathan Nieder
  0 siblings, 1 reply; 10+ messages in thread
From: Bradley Wagner @ 2010-07-29  1:21 UTC (permalink / raw)
  To: Jeff King; +Cc: Avery Pennarun, Ævar Arnfjörð, git

On Wed, Jul 28, 2010 at 9:03 PM, Jeff King <peff@peff.net> wrote:
> On Wed, Jul 28, 2010 at 04:49:11PM -0400, Avery Pennarun wrote:
>
>> It sounds like --log and -m are currently incompatible, in that -m
>> overrides --log, and that's not the desired behaviour.  Bradley: this
>> is probably a relatively easy fix to make, in case you're looking to
>> get into some git hacking. :)
>
> Really? I get:
>
>  $ mkdir repo && cd repo && git init &&
>    echo content >file && git add file && git commit -m one &&
>    echo content >>file && git commit -a -m two &&
>    git checkout -b other HEAD^ &&
>    echo content >file2 && git add file2 && git commit -m three &&
>    git merge --log -m "custom message" master &&
>    git show
>
>  commit fa21035ea5f5437e8664a5d249e7ab88ee3f0e75
>  Merge: d12be4a 4dc5cba
>  Author: Jeff King <peff@peff.net>
>  Date:   Wed Jul 28 20:50:39 2010 -0400
>
>      custom message
>
>      * master:
>        two
>
> which seems to be what was asked for. So is the problem just that
> git-pull does not take "-m"?
>
> -Peff
>

--log is supposed to include one-log summaries of each of the merged
commits, right? It's not doing that for me when when I do 'git merge
--log -m "message" <branch>'. Instead, it's only using the message I
specified with -m.

One difference is that I'm merging topic branch into master but that
shouldn't make any difference.

Your right that the other part of the request is to add -m to pull.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-29  1:21       ` Bradley Wagner
@ 2010-07-29  1:27         ` Jonathan Nieder
  2010-07-29  1:30           ` Bradley Wagner
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Nieder @ 2010-07-29  1:27 UTC (permalink / raw)
  To: Bradley Wagner
  Cc: Jeff King, Avery Pennarun, Ævar Arnfjörð, git,
	Tay Ray Chuan

Bradley Wagner wrote:
> On Wed, Jul 28, 2010 at 9:03 PM, Jeff King <peff@peff.net> wrote:

>> Really? I get:
[...]
> --log is supposed to include one-log summaries of each of the merged
> commits, right? It's not doing that for me

Just a wild guess, but are you using a version of git before
1.7.1.1?

If you upgrade, you'll be able to use -m with --log for
"git merge", at least (v1.7.1.1~23^2: merge: --log appends
shortlog to message if specified, 2010-05-11).

Thanks, Tay!
Jonathan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-29  1:27         ` Jonathan Nieder
@ 2010-07-29  1:30           ` Bradley Wagner
  2010-07-29  4:20             ` Bradley Wagner
  0 siblings, 1 reply; 10+ messages in thread
From: Bradley Wagner @ 2010-07-29  1:30 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Jeff King, Avery Pennarun, Ævar Arnfjörð, git,
	Tay Ray Chuan

On Wed, Jul 28, 2010 at 9:27 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Bradley Wagner wrote:
>> On Wed, Jul 28, 2010 at 9:03 PM, Jeff King <peff@peff.net> wrote:
>
>>> Really? I get:
> [...]
>> --log is supposed to include one-log summaries of each of the merged
>> commits, right? It's not doing that for me
>
> Just a wild guess, but are you using a version of git before
> 1.7.1.1?

Certainly am: git version 1.7.0

> If you upgrade, you'll be able to use -m with --log for
> "git merge", at least (v1.7.1.1~23^2: merge: --log appends
> shortlog to message if specified, 2010-05-11).

Thanks, I'll do that.

> Thanks, Tay!
> Jonathan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-29  1:30           ` Bradley Wagner
@ 2010-07-29  4:20             ` Bradley Wagner
  2010-07-29  4:22               ` Avery Pennarun
  0 siblings, 1 reply; 10+ messages in thread
From: Bradley Wagner @ 2010-07-29  4:20 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Jeff King, Avery Pennarun, Ævar Arnfjörð, git,
	Tay Ray Chuan

On Wed, Jul 28, 2010 at 9:30 PM, Bradley Wagner
<bradley.wagner@hannonhill.com> wrote:
> On Wed, Jul 28, 2010 at 9:27 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Bradley Wagner wrote:
>>> On Wed, Jul 28, 2010 at 9:03 PM, Jeff King <peff@peff.net> wrote:
>>
>>>> Really? I get:
>> [...]
>>> --log is supposed to include one-log summaries of each of the merged
>>> commits, right? It's not doing that for me
>>
>> Just a wild guess, but are you using a version of git before
>> 1.7.1.1?
>
> Certainly am: git version 1.7.0
>
>> If you upgrade, you'll be able to use -m with --log for
>> "git merge", at least (v1.7.1.1~23^2: merge: --log appends
>> shortlog to message if specified, 2010-05-11).
>
> Thanks, I'll do that.

New version works great with merge. Thanks guys! Now I'm wondering if
we could bring -m flag to pull.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Possible feature request for merge and pull
  2010-07-29  4:20             ` Bradley Wagner
@ 2010-07-29  4:22               ` Avery Pennarun
  0 siblings, 0 replies; 10+ messages in thread
From: Avery Pennarun @ 2010-07-29  4:22 UTC (permalink / raw)
  To: Bradley Wagner
  Cc: Jonathan Nieder, Jeff King, Ævar Arnfjörð, git,
	Tay Ray Chuan

On Thu, Jul 29, 2010 at 12:20 AM, Bradley Wagner
<bradley.wagner@hannonhill.com> wrote:
> New version works great with merge. Thanks guys! Now I'm wondering if
> we could bring -m flag to pull.

I'm sure this is also an easy patch if you're in the mood to contribute it :)

Perhaps there are reasons this was left out originally, but I'm
guessing it was just that nobody expressed any need for it.

Have fun,

Avery

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-29  4:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28  1:24 Possible feature request for merge and pull Bradley Wagner
2010-07-28  7:34 ` Ævar Arnfjörð Bjarmason
2010-07-28 20:49   ` Avery Pennarun
2010-07-28 20:55     ` Bradley Wagner
2010-07-29  1:03     ` Jeff King
2010-07-29  1:21       ` Bradley Wagner
2010-07-29  1:27         ` Jonathan Nieder
2010-07-29  1:30           ` Bradley Wagner
2010-07-29  4:20             ` Bradley Wagner
2010-07-29  4:22               ` Avery Pennarun

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).