git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cogito and merging in steps.
@ 2005-08-23  6:29 Martin Langhoff
  2005-09-12  0:11 ` Petr Baudis
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Langhoff @ 2005-08-23  6:29 UTC (permalink / raw)
  To: GIT

Is there any way to merge patches "selectively"? 

I have found that if I do 

   cg-pull
   cg-log -r master:origin

I can review the commits that will be merged if I do cg-update. 

Say I do cg-update, it brings a lot of commits and there is a messy
conflict. I immediately can  narrow down on which commit I am merging
it is that has a conflict.

With this info, it'd be interesting to be able to merge not to the tip
of the head (head of the head? =- bah, tip of the branch! :) but to an
earlier commit, so I can resolve the conflict with a more specific
commit.

Say I am merging a series of 10 commits that happened in the shared
repo to the project while I worked disconnected (and did lots of local
commits). The first 8 commits merge cleanly, the 9th is an ugly
conflict I have to resolve, and the 10th is clean and unrelated.

I want to be able to 
 - cg-update
 - oops! this is a mess! review with cg-log -r master:origin
 - aha! Here is the conflict in the 9th commit from MacFroz, fire off
email / open irc session
 - in the meantime, reset the working copy and merge the 8 clean ones
with something like: cg-restore ; cg-update origin^^^ ; cg-commit
 - cg-update origin^ ; emacs file-with-conflict.c ; cg-commit 
 - cg-update # bring in the last pending commit from origin. 

How can I achieve the cg-update <somepointinthebranch> ; cg-commit ? I
mean, without faking a head with

  echo <somepointinthebranch> > .git/refs/heads/temphead 

cheers,


martin
cheers,


martin

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

* Re: cogito and merging in steps.
  2005-08-23  6:29 cogito and merging in steps Martin Langhoff
@ 2005-09-12  0:11 ` Petr Baudis
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Baudis @ 2005-09-12  0:11 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: GIT

Dear diary, on Tue, Aug 23, 2005 at 08:29:46AM CEST, I got a letter
where Martin Langhoff <martin.langhoff@gmail.com> told me that...
> I want to be able to 
>  - cg-update
>  - oops! this is a mess! review with cg-log -r master:origin
>  - aha! Here is the conflict in the 9th commit from MacFroz, fire off
> email / open irc session
>  - in the meantime, reset the working copy and merge the 8 clean ones
> with something like: cg-restore ; cg-update origin^^^ ; cg-commit
>  - cg-update origin^ ; emacs file-with-conflict.c ; cg-commit 
>  - cg-update # bring in the last pending commit from origin. 
> 
> How can I achieve the cg-update <somepointinthebranch> ; cg-commit ? I
> mean, without faking a head with
> 
>   echo <somepointinthebranch> > .git/refs/heads/temphead 

Theoretically, it should be as easy as

	cg-merge <somepointinthebranch>

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone.  -- Alan Cox

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

end of thread, other threads:[~2005-09-12  0:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-23  6:29 cogito and merging in steps Martin Langhoff
2005-09-12  0:11 ` Petr Baudis

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