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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
>
>> 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
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux