Re: [PATCH 0/2] "git add -A/--no-all" finishing touches
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 26, 2013, 00:14 UTC
- Message-ID
- <7vhaiuywps.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130425235624.GO29963@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
> Maybe the warning should happen after add_file_to_index() has run, > letting git compare the old and new index entries for that path?
Yeah, new and deleted cases we do not have to worry about, so a no-op add_file_to_index() is the only case we have to be careful. There is a "if verbose, say 'add %s'" logic in the funciton, so it should be possible to enhance the API without affecting existing callers to extract that necessary information out of it.