[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATCH: applied default spacing rules provided by Keith O Hara
From: |
Carl Sorensen |
Subject: |
Re: PATCH: applied default spacing rules provided by Keith O Hara |
Date: |
Sat, 13 Nov 2010 13:18:06 -0700 |
On 11/13/10 12:53 PM, "Mark Polesky" <address@hidden> wrote:
> James Lowe wrote:
>>> Looks like it will be fairly straightforward in this
>>> case, but let me know if you want help with that
>>> process. I figure I should help you there, since I'm
>>> the one who introduced the conflicts.
>>
>> If it's not too much trouble I'd appreciate that.
>
> 1) Make sure the local master branch has no local commits,
> then update it to the current HEAD of
> remotes/origin/master:
>
> $ git checkout master && git pull
> Switched to branch 'master'
> Current branch master is up to date.
>
> 2) Hopefully you have a separate branch dedicated to this
> patch (I'll call it spacing-settings here). Rebase
> spacing-settings off of master, and the first round of
> conflicts will be annotated in the files themselves:
>
> $ git rebase master spacing-settings
> [...]
> error: patch failed: ly/engraver-init.ly:319
> [...]
> error: patch failed: scm/define-grobs.scm:1690
> [...]
>
> 3) Open the first conflicting file (ly/engraver-init.ly) and
> find conflicts by searching for "<<<<<<<<" (there are
> often more than one in the same file). Conflicts are
> annotated like this:
You might try
git mergetool
to do the merge resolution. This may open up an app with side-by-side views
of the files that are conflicting. It makes it much easier.
>>>>>>>>> [name of this commit]:[filename]
>
> 4) Resolve the conflict carefully! Make sure you understand
> why the lines in the both versions were changed in the
> first place, and combine the appropriate elements of
> both. Don't just replace the HEAD's version with the
> commit's version, because then you're undoing some other
> contributor's work.
>
> A good way to approach conflict resolution is to consider
> the negative effects of entirely replacing one version
> with the other.
>
> In the following example, if you just delete the HEAD
> chunk, the newly-renamed properties (staff-staff-,
> staffgroup-staff-) would be replaced with the now invalid
> older names (between-, after-). And if you just delete
> the commit chunk, the new entries for stretchability
> don't get added.
>
> 1692 <<<<<<< HEAD:scm/define-grobs.scm
> 1693 (staff-staff-spacing . ((space . 9)
> 1694 (minimum-distance . 7)
> 1695 (padding . 1)))
> 1696 (staffgroup-staff-spacing . ((space . 10.5)
> 1697 =======
> 1698 (between-staff-spacing . ((space . 9)
> 1699 (stretchability . 5)
> 1700 (minimum-distance . 7)
> 1701 (padding . 1)))
> 1702 (after-last-staff-spacing . ((space . 10.5)
> 1703 (stretchability . 9)
> 1704 >>>>>>> Changes to Default spacing settings:scm/...
>
> So the proper resolution retains
> a) the new property names, and
> b) the entries for stretchability.
>
> 5) Make that change, remove the annotations
> (<<<< ==== >>>>), fix the indentation, and you're done:
>
> 1692 (staff-staff-spacing . ((space . 9)
> 1693 (stretchability . 5)
> 1694 (minimum-distance . 7)
> 1695 (padding . 1)))
> 1696 (staffgroup-staff-spacing . ((space . 10.5)
> 1697 (stretchability . 9)
>
> 6) Resolve all the conflicts in all the affected files
> (steps 3-5), and when you are done, you must `git add'
> the modified files:
>
> $ git add ly/engraver-init.ly scm/define-grobs.scm
If you use git mergetool, you won't need to do the git add.
>
> 7) Then do:
>
> $ git rebase --continue
>
HTH,
Carl