Thread (1 message) 1 message, 1 author, 2021-03-31

Re: [PATCH v2 22/22] pickaxe -G: don't special-case create/delete

From: Junio C Hamano <hidden>
Date: 2021-03-31 00:15:34

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
Instead of special-casing creations and deletions let's just generate
a diff for them.

This logic of not running a diff under -G if we don't have both sides
dates back to the original implementation of -S in
52e9578985f ([PATCH] Introducing software archaeologist's tool
"pickaxe"., 2005-05-21).

In the case of -S we were not working with the xdiff interface and
needed to do this, but when -G was implemented in f506b8e8b5f (git
log/diff: add -G<regexp> that greps in the patch text, 2010-08-23)
this logic was diligently copied over.
Nicely analized.  Yes, I agree that -G that special cases deletion
and creation is just being silly, mimicking what -S did without
thinking.  I can imagine that running grep over diff output in
normal case, and having to run grep over a single side in the edge
cases, would require unnecessary code duplication.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help