On Mon, Oct 29, 2012 at 06:35:21PM -0400, Jeff King wrote:
> The patch below fixes it, but it's terribly inefficient (it just detects
> the situation and reallocates). It would be much better to disable the
> reuse_worktree_file mmap when we populate the filespec, but it is too
> late to pass an option; we may have already populated from an earlier
> diffcore stage.
> I guess if we teach the whole diff code that "-G" (and --pickaxe-regex)
> is brittle, we can disable the optimization from the beginning based on
> the diff options. I'll take a look.
Hmm. That is problematic for two reasons.
1. The whole diff call chain will have to be modified to pass the
options around, so they can make it down to the
diff_populate_filespec level. Alternatively, we could do some kind
of global hack, which is ugly but would work OK in practice.
2. Reusing a working tree file is only half of the reason a filespec
might be mmap'd. It might also be because we are literally diffing
the working tree. "-G" was meant to be used to limit log traversal,
but it also works to reduce the diff output for something like "git
I really wish there were an alternate regexec interface we could use
that took a pointer/size pair. Bleh.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html