Jakub Narebski <jnareb@xxxxxxxxx> writes: > Junio C Hamano <gitster@xxxxxxxxx> writes: > >> * rs/pretty-wrap (2009-10-17) 1 commit >> - Implement wrap format %w() as if it is a mode switch >> (this branch uses js/log-rewrap; is related to jc/strbuf-nested-expand.) >> >> When it comes to design issues to keep unnecessary complexity out, I tend >> to trust Rene (and Nico) a lot more than I trust myself. Tonight's 'pu' >> queues this series instead of my "nested" one. > >> * jc/strbuf-nested-expand (2009-10-18) 3 commits >> . Teach --wrap to only indent without wrapping >> . Add %[wrap(width,in1,in2)<<any-string>>%] implementation >> . strbuf_nested_expand(): allow expansion to interrupt in the middle >> (this branch uses js/log-rewrap; is related to rs/pretty-wrap.) >> >> Ejected from 'pu' to let rs/pretty-wrap in as described above. > > I think nested expand is easier to use than a mode switch: using > scoping (well, kind of) like in high-level programming languages is > IMVHO easier than programming a state machine like in assembler (or > e.g. OpenGL). > > On the other hand this makes pretty format into a mini-language; also > we already have and use mode switches in the form of color codes. > Perhaps if color also used wrapping / nested expand, so one doesn't > have to track where to turn off and on which toggle... Indeed, the "mini-language"-ness was what made Réne worried and reminded me that I should be worried, too. We need to get the design right if we do so---there may come a time that we are better off biting the bullet when we discover needs (notice, it is not "wants, because we can") for many useful string functions, but I do not think we have reached that point yet. >> * jc/pretty-lf (2009-10-04) 1 commit. >> - Pretty-format: %[+-]x to tweak inter-item newlines > > I understand that %a%+b expands to %a%n%b if %b has non-empty > expansion, and to %a if %b is empty, but what %-b is used for? I know you can read the commit log message. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html