Merge branch 'jk/submodule-subdirectory-ok'
authorJunio C Hamano <gitster@pobox.com>
Sun, 30 Jun 2013 22:39:35 +0000 (15:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 30 Jun 2013 22:39:35 +0000 (15:39 -0700)
Allow various subcommands of "git submodule" to be run not from the
top of the working tree of the superproject.

* jk/submodule-subdirectory-ok:
  submodule: drop the top-level requirement
  rev-parse: add --prefix option
  submodule: show full path in error message
  t7403: add missing && chaining
  t7403: modernize style
  t7401: make indentation consistent

1  2 
git-submodule.sh
t/t7400-submodule-basic.sh

@@@ -112,8 -150,9 +150,9 @@@ relative_path (
  #
  module_list()
  {
+       eval "set $(git rev-parse --sq --prefix "$wt_prefix" -- "$@")"
        (
 -              git ls-files --error-unmatch --stage -- "$@" ||
 +              git ls-files -z --error-unmatch --stage -- "$@" ||
                echo "unmatched pathspec exists"
        ) |
        perl -e '
Simple merge