Let submodule command exit with error status if path does not exist

Various subcommands of the "git submodule" command exited with 0
status even though the path given by the user did not exist.

The reason behind that was that they all pipe the output of
module_list into the while loop which then does the action on the
paths specified by the commandline. Since the exit code of the
command on the upstream side of the pipe is ignored by the shell,
the status code of "ls-files --error-unmatch" nor "module_list" was
not propagated.

In case ls-files returns with an error code, we write a special
string that is not possible in non error situations, and no other
output, so that the downstream can detect the error and die with an
error code.

The error message that there is an unmatched pathspec comes through
stderr directly from ls-files. So the user still gets a hint whats going
on.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/maint-push-refs-all' into pu

Allows pushing and fetching refs/stash.

* jc/maint-push-refs-all:
  get_fetch_map(): tighten checks on dest refs
  fetch/push: allow refs/*:refs/*
Merge branch 'mz/cherry-code-cleanup' into pu

Minor code clean-up on the cherry-pick codepath.
Not urgent (non regression).

* mz/cherry-code-cleanup:
  cherry: remove redundant check for merge commit
  cherry: don't set ignored rev_info options
  remove unnecessary parameter from get_patch_ids()
Merge branch 'bc/prune-info' into pu

Teach "git prune" without "-v" to be silent about leftover temporary files.

Not urgent (non regression).

* bc/prune-info:
  prune.c: only print informational message in show_only or verbose mode
Merge branch 'jc/tag-doc' into pu

Our documentation used to assume having files in .git/refs/*
directories was the only to have branches and tags, but that is not
true for quite some time.

Not urgent (non regression).

* jc/tag-doc:
  Documentation: do not mention .git/refs/* directories
Merge branch 'jc/capabilities' (early part) into pu

* 'jc/capabilities' (early part):
  fetch-pack: do not ask for unadvertised capabilities
Merge branch 'ms/git-svn-1.7' into pu

A series by Michael Schwern via Eric to update git-svn to revamp the
way URLs are internally passed around, to make it work with SVN 1.7.

* ms/git-svn-1.7:
  git-svn: remove ad-hoc canonicalizations
  git-svn: canonicalize newly-minted URLs
  git-svn: introduce add_path_to_url function
  git-svn: canonicalize earlier
  git-svn: replace URL escapes with canonicalization
  git-svn: attempt to mimic SVN 1.7 URL canonicalization
  t9107: fix typo
  t9118: workaround inconsistency between SVN versions
  Git::SVN{,::Ra}: canonicalize earlier
  git-svn: path canonicalization uses SVN API
  Git::SVN::Utils: remove irrelevant comment
  git-svn: add join_paths() to safely concatenate paths
  git-svn: factor out _collapse_dotdot function
  git-svn: use SVN 1.7 to canonicalize when possible
  git-svn: move canonicalization to Git::SVN::Utils
  use Git::SVN{,::RA}->url accessor globally
  use Git::SVN->path accessor globally
  Git::SVN::Ra: use accessor for URLs
  Git::SVN: use accessor for URLs internally
  Git::SVN: use accessors internally for path
Merge branch 'jc/maint-protect-sh-from-ifs' into pu

When the user exports a non-default IFS without HT, scripts that
rely on being able to parse "ls-files -s | while read a b c..."
start to fail.  Protect them from such a misconfiguration.

* jc/maint-protect-sh-from-ifs:
  sh-setup: protect from exported IFS
Merge branch 'jk/docs-docbook-monospace-display' into pu

The documentation in the TeXinfo format was using indented output
for materials meant to be examples that are better typeset in
monospace.

Not urgent (non regression).

* jk/docs-docbook-monospace-display:
  docs: monospace listings in docbook output
Merge branch 'jk/check-docs-update' into pu

Simplify "make check-docs" implementation and update its coverage.

* jk/check-docs-update:
  check-docs: get documented command list from Makefile
  check-docs: drop git-help special-case
  check-docs: list git-gui as a command
  check-docs: factor out command-list
  command-list: mention git-credential-* helpers
  command-list: add git-sh-i18n
  check-docs: update non-command documentation list
  check-docs: mention gitweb specially
Merge branch 'mz/empty-rebase-test' into pu

* mz/empty-rebase-test:
  add tests for 'git rebase --keep-empty'
Merge branch 'mg/rebase-i-onto-reflog-in-full' into pu

The reflog entries left by "git rebase" and "git rebase -i" were
inconsistent.

* mg/rebase-i-onto-reflog-in-full:
  rebase -i: use full onto sha1 in reflog
Merge branch 'js/gitweb-path-info-unquote' into pu

Stripping of PATH_INFO in gitweb did not take url style quoting into
account, failing to notice directories with funny characters e.g. SP
in their paths.

* js/gitweb-path-info-unquote:
  gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO
Merge branch 'hv/submodule-path-unmatch' into pu

* hv/submodule-path-unmatch:
  Let submodule command exit with error status if path does not exist
Merge branch 'jc/capabilities' into pu

Some capabilities were asked by fetch-pack even when upload-pack did
not advertise that they are available.  Fix fetch-pack not to do so.

May have to be rebased to older maintenance tracks before moving
forward.

* jc/capabilities:
  fetch-pack: mention server version with verbose output
  parse_feature_request: make it easier to see feature values
Merge branch 'jc/add-delete-default' into pu

* jc/add-delete-default:
  git add: notice removal of tracked paths by default
Merge branch 'jc/maint-rev-list-topo-doc' into pu

* jc/maint-rev-list-topo-doc:
  rev-list docs: clarify --topo-order description
Merge branch 'lt/commit-tree-guess-utf-8' into pu

Teaches "git commit" and "git commit-tree" the "we are told to use
utf-8 in log message, but this does not look like utf-8---attempt to
pass it through convert-from-latin1-to-utf8 and see if it makes
sense" heuristics "git mailinfo" already uses.

A draft from Linus received privately without a log message.
Expecting a reroll.

* lt/commit-tree-guess-utf-8:
  commit/commit-tree: correct latin1 to utf-8
Merge branch 'jl/submodule-rm' into pu

Expecting a reroll.

* jl/submodule-rm:
  rm: remove submodules from the index and the .gitmodules file
  rm: don't fail when removing populated submodules
Merge branch 'mb/remote-default-nn-origin' into pu

When the user does not specify what remote to interact with, we
often attempt to use 'origin'.  This can now be customized via a
configuration variable.

Expecting a reroll.
"The first remote becomes the default" bit is better done as a
separate step.

* mb/remote-default-nn-origin:
  Teach get_default_remote to respect remote.default.
  Test that plain "git fetch" uses remote.default when on a detached HEAD.
  Teach clone to set remote.default.
  Teach "git remote" about remote.default.
  Teach remote.c about the remote.default configuration setting.
  Rename remote.c's default_remote_name static variables.