On Thu, Dec 17, 2009 at 1:41 PM, Todd Zullinger <[email protected]> wrote: > Markus Roberts wrote: >> Yeah, I know. My coefficient of curmudgeonosity is abnormally high >> the past 20 hours or so. My frustration is that when I wind up >> making cleanups in the process of finding the fix and it takes much >> longer than I felt like it should have I'm not relishing the task of >> remaking them all to sort out which is which. Doing them as >> independent micro-commits and sorting before squashing is a >> nightmare if the affected lines overlap. The easiest is generally >> to reintroduce the bug in the cleaned up version, make that a >> commit, and then take it out again for the second commit. But it >> still seems onerous when I'm grumpy (normally I'd just suck it up & >> deal). > > I find that using the technique outlined in the git-rebase(1) section > "SPLITTING COMMITS" to tease apart the changes in a commit is not too > bad. > > If you've not used that, it's worth a try. > > Basically, you use 'git rebase -i <commitish>' and mark the commit you > want to split with 'edit'. Then use 'git reset HEAD^' to rewind the > index but leave the changes in the work tree. Then use 'git add -p' > to stage the changes you want for each separate commit.
I will certainly look into that. Git does not see the world the way I do, but I'm learning to adapt to it. My main problem is when the changes affect the same lines (e.g. I reorganize to make the logic clearer without changing the meaning, see the problem, change it, test it, then find that there is an additional complication and repeat...) These sorts of changes are hard to tease apart. -- Markus ----------------------------------------------------------- The power of accurate observation is commonly called cynicism by those who have not got it. ~George Bernard Shaw ------------------------------------------------------------ -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
