[MPlayer-dev-eng] git-svn

Clément Bœsch ubitux at gmail.com
Sat Jan 22 21:37:13 CET 2011


On Sat, Jan 22, 2011 at 09:26:45PM +0100, Nicolas George wrote:
> Le tridi 3 pluviôse, an CCXIX, Clément Bœsch a écrit :
> > * lo (vobsub-fix branch): [1]--[2]--[3]--[4]--[5]--[X]--[Y]--[Z]
> 
> What do you do if someone tells you there is a typo in X?
> 

If it's not in conflict with Y and Z, I just fix the typo on top of the
tree:

 * lo (vobsub-fix branch): [1]--[2]--[3]--[4]--[5]--[X]--[Y]--[Z]--[F]

And use git rebase -i master to move the commit just after [X], and
transform it in a "fixup" commit.

If it's in conflict, I use to do a git rebase -i master, and flag the X commit
in "edit":

 * lo (no-branch):         [1]--[2]--[3]--[4]--[5]--[X]
   lo (vobsub-fix branch): [1]--[2]--[3]--[4]--[5]--[X]--[Y]--[Z]

Make the fix:

 * lo (no-branch):         [1]--[2]--[3]--[4]--[5]--[X]--[F]
   lo (vobsub-fix branch): [1]--[2]--[3]--[4]--[5]--[X]--[Y]--[Z]

And:

  git rebase --continue

> What I have been doing till now is to use a separate branch for each stage
> of the patchset:
> 
> master   1 -- 2 -- 3
> branch-x            \-- X1 -- X2 -------- X3
> branch-y                        \-- Y1 -- Y2 >- Ym -- Y3
> 
> X1, Y1, Y2 are "private" commits, steps in the maturing of the patch but
> unsuited to appear in the public history. When patches have been throughly
> reviewed, I would checkout the head of the branch and "svn commit" it,
> bypassing Git.
> 

Looks a bit overkill but why not.

> I wonder what is the pure Git way to do that: commit branch A into branch B
> so that it appears not as a merge commit but as a single big commit.
> 

If you want to make a single big commit, you just squash/fixup them
after/before the rebase with git rebase -i.

-- 
Clément B.


More information about the MPlayer-dev-eng mailing list