Merge branch 'jc/ls-files-i-dir'
authorJunio C Hamano <gitster@pobox.com>
Thu, 21 Jun 2012 21:42:06 +0000 (14:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 Jun 2012 21:42:07 +0000 (14:42 -0700)
"git ls-files --exclude=t -i" did not consider anything under t/
as excluded, as it did not pay attention to exclusion of leading
paths while walking the index.  Other two users of excluded() are
also updated.

* jc/ls-files-i-dir:
  dir.c: make excluded() file scope static
  unpack-trees.c: use path_excluded() in check_ok_to_remove()
  builtin/add.c: use path_excluded()
  path_excluded(): update API to less cache-entry centric
  ls-files -i: micro-optimize path_excluded()
  ls-files -i: pay attention to exclusion of leading paths

1  2 
builtin/add.c
dir.c
dir.h
unpack-trees.c

diff --cc builtin/add.c
index b79336d712b4c71cc2f026b0e9f42ea0bcebfc6f,e5b40d98739a590e5b69ba9c793b901b14ee1ead..87446cf92a686ed69717c85a6b38302f59351460
@@@ -458,10 -459,9 +461,11 @@@ int cmd_add(int argc, const char **argv
                        }
                }
                free(seen);
+               path_exclude_check_clear(&check);
        }
  
 +      plug_bulk_checkin();
 +
        exit_status |= add_files_to_cache(prefix, pathspec, flags);
  
        if (add_new_files)
diff --cc dir.c
Simple merge
diff --cc dir.h
Simple merge
diff --cc unpack-trees.c
Simple merge