git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to merge FETCH_HEAD?

From
MTMichael S. Tsirkin <mst@mellanox.co.il>
Date
Jan 16, 2007, 21:33 UTC
Message-ID
<20070116213340.GB4329@mellanox.co.il>
In-Reply-To
<20070116195914.GA29100@spearce.org>
Show 28 quoted lines
> Quoting Shawn O. Pearce <spearce@spearce.org>:
> Subject: Re: How to merge FETCH_HEAD?
> 
> "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.
Would it be useful to have git-pull . FETCH_HEAD work?
-- 
MST
Previous: Shawn O. PearceNext: Johannes Schindelin
Message 6 of 19 in “new config option remote.<name>.pushexec”
  1. new config option remote.<name>.pushexecUwe Kleine-König, Jan 16, 2007
  2. Johannes SchindelinJan 16, 2007
  3. Uwe Kleine-KönigJan 16, 2007
  4. How to merge FETCH_HEAD?Michael S. Tsirkin, Jan 16, 2007
  5. Shawn O. PearceJan 16, 2007
  6. Michael S. TsirkinJan 16, 2007
  7. Johannes SchindelinJan 16, 2007
  8. Michael S. TsirkinJan 17, 2007
  9. Junio C HamanoJan 17, 2007
  10. Michael S. TsirkinJan 17, 2007
  11. Junio C HamanoJan 16, 2007
  12. Shawn O. PearceJan 16, 2007
  13. Johannes SchindelinJan 16, 2007
  14. Uwe Kleine-KönigJan 17, 2007
  15. Junio C HamanoJan 17, 2007
  16. Uwe Kleine-KönigJan 18, 2007
  17. make --upload-pack option to git-fetch configurableUwe Kleine-König, Jan 25, 2007
  18. Uwe Kleine-KönigJan 25, 2007
  19. Brian GernhardtJan 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.