Re: What's cooking in git.git (Oct 2009, #04; Wed, 21)
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:36
Jakub Narebski [off-list ref] writes:
Junio C Hamano [off-list ref] writes:quoted
* 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.quoted
* 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.
quoted
* jc/pretty-lf (2009-10-04) 1 commit. - Pretty-format: %[+-]x to tweak inter-item newlinesI 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.