Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: >> By the way, wouldn't it make sense to optimize the precontext of that >> hunk by doing _something_ like: >> >> if (!o->word_regex && strcmp(one->path, two->path)) >> o->word_regex = userdiff_word_regex(two); >> >> "Something like" comes from special cases like /dev/null for new/deleted >> files, etc. > > You mean to avoid the cost of initializing the regex in case one and the > same file is diffed against itself? No. What I meant is much simpler than that. If one and two are the same filename, and earlier gitattributes lookup for the path already failed to produce any when you checked one, isn't it very likely that the gitattributes lookup for two would fail the same way to produce any result? -- 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