git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: git@vger.kernel.org
Subject: Re: git merge FETCH_HEAD produced bad commit message
Date: Fri, 26 Jan 2007 10:02:17 +0100	[thread overview]
Message-ID: <81b0412b0701260102j7d1c44d5nd5aa489cb8312722@mail.gmail.com> (raw)
In-Reply-To: <20070125145229.GE25265@mellanox.co.il>

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.

  reply	other threads:[~2007-01-26  9:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 14:52 git merge FETCH_HEAD produced bad commit message Michael S. Tsirkin
2007-01-26  9:02 ` Alex Riesen [this message]
2007-01-26 14:24   ` Michael S. Tsirkin
2007-01-26 14:32     ` Alex Riesen
2007-01-26 14:42       ` Michael S. Tsirkin

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=81b0412b0701260102j7d1c44d5nd5aa489cb8312722@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mst@mellanox.co.il \
    /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).