Merge branch 'bw/pathspec-sans-the-index'
authorJunio C Hamano <gitster@pobox.com>
Tue, 30 May 2017 02:16:40 +0000 (11:16 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 May 2017 02:16:40 +0000 (11:16 +0900)
Simplify parse_pathspec() codepath and stop it from looking at the
default in-core index.

* bw/pathspec-sans-the-index:
pathspec: convert find_pathspecs_matching_against_index to take an index
pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP
ls-files: prevent prune_cache from overeagerly pruning submodules
pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE flag
submodule: add die_in_unpopulated_submodule function
pathspec: provide a more descriptive die message

1  2 
builtin/add.c
builtin/check-ignore.c
builtin/ls-files.c
builtin/reset.c
submodule.c
submodule.h
t/t6134-pathspec-in-submodule.sh
diff --cc builtin/add.c
Simple merge
Simple merge
Simple merge
diff --cc builtin/reset.c
Simple merge
diff --cc submodule.c
Simple merge
diff --cc submodule.h
Simple merge
index 99a8982ab1554c6c2324402f78f46954445596fd,0f1cb49cedc645c5a9b0c56257d3aca4740d5cd3..c670668409817c6d1066de53dc294bade2f27e93
@@@ -21,16 -21,12 +21,12 @@@ EO
  test_expect_success 'error message for path inside submodule' '
        echo a >sub/a &&
        test_must_fail git add sub/a 2>actual &&
 -      test_cmp expect actual
 +      test_i18ncmp expect actual
  '
  
- cat <<EOF >expect
- fatal: Pathspec '.' is in submodule 'sub'
- EOF
  test_expect_success 'error message for path inside submodule from within submodule' '
        test_must_fail git -C sub add . 2>actual &&
-       test_i18ncmp expect actual
+       test_i18ngrep "in unpopulated submodule" actual
  '
  
  test_done