Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

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

 



Junio C Hamano wrote:
>> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

>>> Do you mean files that were touched but have no content change, or
>>> something more subtle?
[...]
> Ahh, I haven't run anything under the debugger yet, but I think I
> know what is going on.
>
> Don't we limit our "update-index --refresh" equivalent to the
> original pathspec, even though your "-u/-A sans pathspec" warning
> detection relies on grabbing the changes from the entire tree?

I think it's more basic than that.  "git add" doesn't bother to
run an "update-index --refresh" equivalent before its main loop
unless you pass --refresh to it, since reading files to compare
them to the index would be duplicated work.  The files hit in
update_callback() are only potentially modified.

Maybe the warning should happen after add_file_to_index() has run,
letting git compare the old and new index entries for that path?

Jonathan
--
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]