From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: git@vger.kernel.org
Subject: Re: How to merge FETCH_HEAD?
Date: Tue, 16 Jan 2007 14:59:14 -0500 [thread overview]
Message-ID: <20070116195914.GA29100@spearce.org> (raw)
In-Reply-To: <20070116173706.GB20898@mellanox.co.il>
"Michael S. Tsirkin" <mst@mellanox.co.il> wrote:
> OK, I did a fetch and now I can see remote history by
>
> $git log FETCH_HEAD
Wow, I'm suprised that works. Handy feature. Too bad rev-parse
--verify then chokes on it when we'll somehow consider it a ref
otherwise...
> But, how to merge it?
Look at git-pull.sh:
merge_head=$(sed -e '/ not-for-merge /d' \
-e 's/ .*//' "$GIT_DIR"/FETCH_HEAD | \
tr '\012' ' ')
merge_name=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD")
git-merge "$merge_name" HEAD $merge_head
The not-for-merge keyword is included on lines that were fetched
into tracking branches during the last fetch and which you don't
want to merge right now. So those lines get dropped. Then the
remainder of the line is stripped away, leaving you with only
the sha1 sum. merge_name is computed from the FETCH_HEAD file,
to get the pretty log message for git-merge.
--
Shawn.
next prev parent reply other threads:[~2007-01-16 19:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 15:02 [PATCH RFC] new config option remote.<name>.pushexec Uwe Kleine-König
2007-01-16 15:16 ` Johannes Schindelin
2007-01-16 16:26 ` Uwe Kleine-König
2007-01-16 17:37 ` How to merge FETCH_HEAD? Michael S. Tsirkin
2007-01-16 19:59 ` Shawn O. Pearce [this message]
2007-01-16 21:33 ` Michael S. Tsirkin
2007-01-16 21:36 ` Johannes Schindelin
2007-01-17 5:09 ` Michael S. Tsirkin
2007-01-17 6:14 ` Junio C Hamano
2007-01-17 6:33 ` Michael S. Tsirkin
2007-01-16 20:15 ` Junio C Hamano
2007-01-16 20:08 ` [PATCH RFC] new config option remote.<name>.pushexec Shawn O. Pearce
2007-01-16 20:30 ` Johannes Schindelin
2007-01-17 16:44 ` Uwe Kleine-König
2007-01-17 17:32 ` Junio C Hamano
2007-01-18 7:17 ` Uwe Kleine-König
2007-01-25 4:45 ` [PATCH] make --upload-pack option to git-fetch configurable Uwe Kleine-König
2007-01-25 4:53 ` Uwe Kleine-König
2007-01-16 16:27 ` [PATCH RFC] new config option remote.<name>.pushexec Brian Gernhardt
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=20070116195914.GA29100@spearce.org \
--to=spearce@spearce.org \
--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).