On Wed, Jan 24, 2018 at 7:32 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote: > > Oh, the '#' was probably interpreted as a comment when I applied it ... Indeed. That's a subtle gotcha when you cut-and-paste things into the editor when editing a commit message (including the "git rebase -i" or "git commit --amend" kind of editing). If you just apply it as an email, the hash-marks at the beginning of lines are not seen as comments - it's literally just the editing part that uses them as comments. I'm afraid this isn't really a git "bug". But it _is_ subtle and unlucky. Note that only a hash-mark in the first column is seen as a comment (unlike, say, shell programming), so you can avoid it with spacing. If you quote code with #ifdef etc, indent it. Maybe git should have used a different comment scheme, but I have to admit that I think this is the first time I've heard of this issue causing problems in practice. I'm sure it's triggered before, and nobody has noticed (or I wasn't on the cc). So the '#' thing _normally_ works, but yes, it can cause issues. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |