Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH 1/4] magic pathspec: add tentative ":/path/from/top/level" pathspec support

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:00

Nguyen Thai Ngoc Duy [off-list ref] writes:
2011/4/7 Junio C Hamano [off-list ref]:
quoted
+                       if (('a' <= ch && ch <= 'z') ||
+                           ('A' <= ch && ch <= 'Z')) {
+                               strbuf_addf(&sb, "[%c%c]",
+                                           tolower(ch), toupper(ch));
Nice try. You know you are going to pay a high performance price for
that, don't you ;) Maybe also worth mentioning in document that this
applies to ASCII charset only (as opposed to Unicode).
You know this is a throw-away patch, just to illustrate that some things
are doable with a hack to add more code to get_pathspec(), while others
would need a bigger restructuring, don't you?

Besides, _if_ the user wants to do something costly, as long as the
implementation does not harm common cases, it _still_ is better to make
the code do the work, no?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help