Re: git versus CVS (versus bk)

From: Daniel Barkalow <barkalow@iabervon.org>
Date: 2005-11-01 11:31:50
On Mon, 31 Oct 2005, Joel Becker wrote:

> 	So, I have a git repository that is my For-Linus repository.
> It's got a clean history.  What's my workflow?
> 
> 	1) Clone the repo to a Work tree.
> 	2) Create and test fix X, with perhaps some >1 number of commits.
> 	3) Bring that fix back to the For-Linus repository.
> 
> 	This is a small change.  It's not something that needs stepS, as
> you put them.  But my history in the Work tree is "dirty," so I cannot
> just pull from Work to For-Linus.
> 	As the tools currently stand, I need to hand-diff and patch my
> commits.  Neither git nor cogito have a command to do this first-class
> "the way you should do it" common operation. 

I actually have a set of scripts that I use for this, which I've been too 
lame to clean up properly and send in. The basic idea is:

 (1) "git branch clean mainline"
 (2) "git checkout clean"
      (now I'm looking at the clean history, which doesn't have anything 
       yet)
 (3) "git refine dirty"
      (this says I'm trying to match the content of the head with the 
       dirty history)
 (4) editor window pops up with the diff between the working tree and 
      dirty
 (5) edit the patch, removing hunks which go later in the series, or which 
      I don't want to do at all and forgot to revert.
 (6) it applies the patch; if there are rejects, it goes back to (4)
 (7) normal thing for committing happens
 (8) if there is any difference between the working tree and dirty, it 
      goes back to (4) for the next in the series

I still need to correct the flow control and make it invoke the editor 
automatically and such, and provide some way out of the middle if you want 
to give up or stop without reaching the end, and I have to detect the done 
condition. But the general method does work, provided you're at least 
somewhat comfortable editing patches (with the safety net that nobody else 
will ever see the patch, so it doesn't matter too much if you screw it 
up).

If somebody else wants to clean this up, I can post my version; dunno when 
I'll get around to making it really right.

	-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Nov 01 11:32:46 2005

This archive was generated by hypermail 2.1.8 : 2005-11-01 11:32:53 EST