From: Michael S. Tsirkin Date: Tue, 16 Jan 2007 21:33:40 GMT Subject: Re: How to merge FETCH_HEAD? Message-ID: <20070116213340.GB4329@mellanox.co.il> In-Reply-To: <20070116195914.GA29100@spearce.org> > Quoting Shawn O. Pearce : > Subject: Re: How to merge FETCH_HEAD? > > "Michael S. Tsirkin" 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