Re: [PATCH 3/4] add -u: only show pathless 'add -u' warning when changes exist outside cwd
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 19, 2013, 05:37 UTC
- Message-ID
- <CACsJy8AjqwGVRRiQGMG0AN5qqtvxLk8FHKfUzCZB-7BykrHfjg@mail.gmail.com>
- In-Reply-To
- <7vli9kkoci.fsf@alter.siamese.dyndns.org>
On Tue, Mar 19, 2013 at 11:25 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> I am wondering if we can special case the no-pathspec case to have > add_files_to_cache() call underlying run_diff_files() without any > pathspec, inspect the paths that are modified and/or deleted in the > update_callback, add ones that are under the $prefix while noticing > the ones outside as warning worthy events.
My concern is run full-tree diff can be expensive on large repos (one of the reasons the user may choose to work from within a subdirectory). We can exit as soon as we find a difference outside $prefix. But in case we find nothing, we need to diff the whole worktree.
-- Duy