Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Add --show-touched option to show "diff --git" line when contents are unchanged

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:26

Junio C Hamano [off-list ref] writes:
Johannes Schindelin [off-list ref] writes:
quoted
But I'd really think that what should be done (if anything has to be done 
at all) is to introduce a config variable which triggers the same logic in 
git-diff as was introduced in 2b5f9a8c0cff511f2bb0833b1ee02645b79323f4.
Sorry, I don't follow at all.  The diff toolchain works all
inside core without having to write a temporary index out, which
was the issue the commit you are quoting was about.

In any case, enough discussion.  Here is an updated patch, which
I _could_ be pursuaded to consider for inclusion after v1.5.3
happens, if there are enough agreements and Acks.
To me, that patch makes sense, yes.

That said, a configuration option would probably be better than a
command-line option. The expected behavior seems to depend on user,
but not much on use-cases. So, people who like the old behavior could
set the option and forget about it, and other would not be distracted
about it.

Also, is there any particular reason not to update the index stat
information when files are found to be identical? Well, we've
discussed that quite much in this thread, but this is what status is
doing, and I still fail to see why diff shouldn't. (I can update the
patch myself if you agree it should be done. I don't know the git
codebase well, so it takes time for me, but the exercise is fun ;-) )

Side performance note: if I understand your patch correctly, you're
comparing the file content twice for actually modified changes. But
that probably doesn't matter much since the expansive thing is to load
the files and to compute the diff.

Thanks,

-- 
Matthieu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help