[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: |
Mark Polesky |
Subject: |
RE: PATCH: applied default spacing rules provided by Keith O Hara |
Date: |
Sat, 13 Nov 2010 11:53:06 -0800 (PST) |
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:
<<<<<<<< HEAD:[filename]
the lines as they appear in HEAD (i.e. the master branch)
========
the lines as they appear in this commit
>>>>>>>> [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
7) Then do:
$ git rebase --continue
You may have to do several rounds of this in complex cases,
but in this case, one should work.
Let me know if you need more help.
- Mark