git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git merge FETCH_HEAD produced bad commit message
@ 2007-01-25 14:52 Michael S. Tsirkin
  2007-01-26  9:02 ` Alex Riesen
  0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2007-01-25 14:52 UTC (permalink / raw)
  To: git

Hi!
I like to do
	$git fetch <URL>

	$git log FETCH_HEAD
	
	$git merge FETCH_HEAD

I would expect this to be equivalent to

	git pull <URL>
	
However, the message that git merge produces in this case
is less than informative:

commit 3c11f564846227d80aa76b579c974913c3602862
Merge: 9871244... f5e6d63...
Author: Michael S. Tsirkin <mst@mellanox.co.il>
Date:   Thu Jan 25 16:46:51 2007 +0200

    Merge commit 'FETCH_HEAD' into ofed_1_2

I note that FETCH_HEAD actually has the information on where
the commit came from:
$cat .git/FETCH_HEAD
f5e6d63839970f4785c36b6be3835f037e74195c ssh://<hidden>/usr/src/ofed_1_2

So can not git merge be enhanced to put this data in commit log?

-- 
MST

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

* Re: git merge FETCH_HEAD produced bad commit message
  2007-01-25 14:52 git merge FETCH_HEAD produced bad commit message Michael S. Tsirkin
@ 2007-01-26  9:02 ` Alex Riesen
  2007-01-26 14:24   ` Michael S. Tsirkin
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Riesen @ 2007-01-26  9:02 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: git

On 1/25/07, Michael S. Tsirkin <mst@mellanox.co.il> wrote:
> Hi!
> I like to do
>         $git fetch <URL>
>
>         $git log FETCH_HEAD
>
>         $git merge FETCH_HEAD
>
> I would expect this to be equivalent to
>
>         git pull <URL>
>
> However, the message that git merge produces in this case
> is less than informative:
>
> commit 3c11f564846227d80aa76b579c974913c3602862
> Merge: 9871244... f5e6d63...
> Author: Michael S. Tsirkin <mst@mellanox.co.il>
> Date:   Thu Jan 25 16:46:51 2007 +0200
>
>     Merge commit 'FETCH_HEAD' into ofed_1_2
>
> I note that FETCH_HEAD actually has the information on where
> the commit came from:
> $cat .git/FETCH_HEAD
> f5e6d63839970f4785c36b6be3835f037e74195c ssh://<hidden>/usr/src/ofed_1_2
>
> So can not git merge be enhanced to put this data in commit log?
>

Does it need to?
Is the below enough (could be line-wrapped):

git merge --no-commit FETCH_HEAD && \
git commit -M "Merge $(cut -d ' ' -f 2- < $(git rev-parse
--git-dir)/FETCH_HEAD) \
into $(git name-rev HEAD | cut -d ' ' -f 2-)"

In the long run you'll almost certainly find this commit message
useless, though.

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

* Re: git merge FETCH_HEAD produced bad commit message
  2007-01-26  9:02 ` Alex Riesen
@ 2007-01-26 14:24   ` Michael S. Tsirkin
  2007-01-26 14:32     ` Alex Riesen
  0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2007-01-26 14:24 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

> Quoting Alex Riesen <raa.lkml@gmail.com>:
> Subject: Re: git merge FETCH_HEAD produced bad commit message
> 
> On 1/25/07, Michael S. Tsirkin <mst@mellanox.co.il> wrote:
> > Hi!
> > I like to do
> >         $git fetch <URL>
> >
> >         $git log FETCH_HEAD
> >
> >         $git merge FETCH_HEAD
> >
> > I would expect this to be equivalent to
> >
> >         git pull <URL>
> >
> > However, the message that git merge produces in this case
> > is less than informative:
> >
> > commit 3c11f564846227d80aa76b579c974913c3602862
> > Merge: 9871244... f5e6d63...
> > Author: Michael S. Tsirkin <mst@mellanox.co.il>
> > Date:   Thu Jan 25 16:46:51 2007 +0200
> >
> >     Merge commit 'FETCH_HEAD' into ofed_1_2
> >
> > I note that FETCH_HEAD actually has the information on where
> > the commit came from:
> > $cat .git/FETCH_HEAD
> > f5e6d63839970f4785c36b6be3835f037e74195c ssh://<hidden>/usr/src/ofed_1_2
> >
> > So can not git merge be enhanced to put this data in commit log?
> >
> 
> Does it need to?

FETCH_HEAD is not a real head name, so I think the message above is a bug.

> Is the below enough (could be line-wrapped):
> 
> git merge --no-commit FETCH_HEAD && \
> git commit -M "Merge $(cut -d ' ' -f 2- < $(git rev-parse
> --git-dir)/FETCH_HEAD) \
> into $(git name-rev HEAD | cut -d ' ' -f 2-)"

Or I can just commit --amend and edit it manually.
But that's not the point.

> In the long run you'll almost certainly find this commit message
> useless, though.

Isn't 'Merge ssh://<hidden>/usr/src/ofed_1_2 info ofed_1_2' much more
useful than Merge commit 'FETCH_HEAD'?

-- 
MST

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

* Re: git merge FETCH_HEAD produced bad commit message
  2007-01-26 14:24   ` Michael S. Tsirkin
@ 2007-01-26 14:32     ` Alex Riesen
  2007-01-26 14:42       ` Michael S. Tsirkin
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Riesen @ 2007-01-26 14:32 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: git

On 1/26/07, Michael S. Tsirkin <mst@mellanox.co.il> wrote:
> > Does it need to?
>
> FETCH_HEAD is not a real head name, so I think the message above is a bug.
>

For whatever Git cares - it is a real reference.

> > Is the below enough (could be line-wrapped):
> >
> > git merge --no-commit FETCH_HEAD && \
> > git commit -M "Merge $(cut -d ' ' -f 2- < $(git rev-parse
> > --git-dir)/FETCH_HEAD) \
> > into $(git name-rev HEAD | cut -d ' ' -f 2-)"
>
> Or I can just commit --amend and edit it manually.
> But that's not the point.

What is the point then? It looked like you were
complaining it were not done automatically.
I showed you how to script it. The message can be
made to look exactly as it is for git-pull. So what's wrong?

> > In the long run you'll almost certainly find this commit message
> > useless, though.
>
> Isn't 'Merge ssh://<hidden>/usr/src/ofed_1_2 info ofed_1_2' much more
> useful than Merge commit 'FETCH_HEAD'?

What for?
Isn't "Merge origin/ofed_1_2 into ofed_1_2" much more useful than
"Merge FETCH_HEAD"?
(IOW: Why don't you just save the fetch result somewhere and
have a "source description" from that?)

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

* Re: git merge FETCH_HEAD produced bad commit message
  2007-01-26 14:32     ` Alex Riesen
@ 2007-01-26 14:42       ` Michael S. Tsirkin
  0 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2007-01-26 14:42 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

> What is the point then?

That
	git fetch <url>
	git merge FETCH_HEAD
should be equivalent to
	git pull <url>
and it isn't

-- 
MST

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

end of thread, other threads:[~2007-01-26 14:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-25 14:52 git merge FETCH_HEAD produced bad commit message Michael S. Tsirkin
2007-01-26  9:02 ` Alex Riesen
2007-01-26 14:24   ` Michael S. Tsirkin
2007-01-26 14:32     ` Alex Riesen
2007-01-26 14:42       ` Michael S. Tsirkin

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