Re: [PATCH] repo-config: support --get-regexp and fix crash
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:25
Johannes Schindelin [off-list ref] writes:
Junio made me aware of a crash, a fix for which was too easy to merit a separate patch.
Not really. The fix is clean-and-obvious, and is readily applicable to "master" without being cooked in "next". On the other hand, --get-regexp may or may not be so; by conflating the two, you are delaying the trivial and useful fix unnecessarily. I already split the patch and applied the fix on "master", while keeping the rest in "pu" (sorry, I ran out of patience to test everything to put it in "next" -- will do so tomorrow). It is usually a good idea to avoid making an otherwise good clean patch a hostage to new features (intentionally or accidentally).
Strange thing I realized: A value is white-space-trimmed at the end only if the line does not end with a comment. This fact is accounted for in the new tests.
Thanks - a note like this helps me quite a bit, because I usually apply e-mailed patches with --whitespace=strip, which would have destroyed the test, leaving me scratching my head without such a notice.