In my opinion, it's rather a bug (or at least strange) that you do get
the repeats
when you don't have the \unfoldRepeats command.
The basic philosophy behind LilyPond is that the input should represent
the music itself, not primarily how it's represented. Your \music variable
only describes 4 me
Try this:
---
\version "2.10.29"
global = {
\skip 1 |
\repeat volta 2 {
\skip 1
}\alternative {{ \skip 1 } {\skip 1 }}
}
music=\relative c' {
\repeat unfold 8 c8 |
\repeat unfold 8 d |
\repeat unfold 8 g,|
g a b c ~ c2
}
\score {
\unfoldRepeats \context Staff << \global \