Merge branch 'jl/submodule-rm' into next

"git rm submodule" cannot blindly remove a submodule directory as
its working tree may have local changes, and worse yet, it may even
have its repository embedded in it.  Teach it some special cases
where it is safe to remove a submodule, specifically, when there is
no local changes in the submodule working tree, and its repository
is not embedded in its working tree but is elsewhere and uses the
gitfile mechanism to point at it.

Will merge to 'master' in the second batch after 1.8.0 ships.

* jl/submodule-rm:
  submodule: teach rm to remove submodules unless they contain a git directory
Merge branch 'jl/submodule-add-by-name' into next

If you remove a submodule, in order to keep the repository so that
"git checkout" to an older commit in the superproject history can
resurrect the submodule, the real repository will stay in $GIT_DIR
of the superproject.  A later "git submodule add $path" to add a
different submodule at the same path will fail.  Diagnose this case
a bit better, and if the user really wants to add an unrelated
submodule at the same path, give the "--name" option to give it a
place in $GIT_DIR of the superproject that does not conflict with
the original submodule.

Will merge to 'master' in the second batch after 1.8.0 ships.

* jl/submodule-add-by-name:
  submodule add: Fail when .git/modules/<name> already exists unless forced
  Teach "git submodule add" the --name option
Merge branch 'jc/grep-pcre-loose-ends' into next

"git log -F -E --grep='<ere>'" failed to use the given <ere>
pattern as extended regular expression, and instead looked for the
string literally.  The early part of this series is a fix for it.

Will merge to 'master' in the second batch after 1.8.0 ships.

* jc/grep-pcre-loose-ends:
  log: honor grep.* configuration
  log --grep: accept --basic-regexp and --perl-regexp
  log --grep: use the same helper to set -E/-F options as "git grep"
  revisions: initialize revs->grep_filter using grep_init()
  grep: move pattern-type bits support to top-level grep.[ch]
  grep: move the configuration parsing logic to grep.[ch]
  builtin/grep.c: make configuration callback more reusable
Merge branch 'km/send-email-compose-encoding' (early part) into next

* 'km/send-email-compose-encoding' (early part):
  git-send-email: introduce compose-encoding
Merge branch 'so/prompt-command' into next

Updates __git_ps1 so that it can be used as $PROMPT_COMMAND,
instead of being used for command substitution in $PS1, to embed
color escape sequences in its output.

* so/prompt-command:
  coloured git-prompt: paint detached HEAD marker in red
  Fix up colored git-prompt
  show color hints based on state of the git tree
  Allow __git_ps1 to be used in PROMPT_COMMAND
Merge branch 'jk/maint-http-init-not-in-result-handler' into next

Further clean-up to the http codepath that picks up results after
cURL library is done with one request slot.

Will merge to 'master' in the second batch after 1.8.0 ships.

* jk/maint-http-init-not-in-result-handler:
  http: do not set up curl auth after a 401
  remote-curl: do not call run_slot repeatedly
Merge branch 'nd/grep-true-path' into next

"git grep -e pattern <tree>" asked the attribute system to read
"<tree>:.gitattributes" file in the working tree, which was
nonsense.

Will merge to 'master' in the second batch after 1.8.0 ships.

* nd/grep-true-path:
  grep: stop looking at random places for .gitattributes
Merge branch 'rs/lock-correct-ref-during-delete' into next

When "update-ref -d --no-deref SYM" tried to delete a symbolic ref
SYM, it incorrectly locked the underlying reference pointed by SYM,
not the symbolic ref itself.

* rs/lock-correct-ref-during-delete:
  refs: lock symref that is to be deleted, not its target
Merge branch 'nd/attr-match-optim-more' into next

Start laying the foundation to build the "wildmatch" after we can
agree on its desired semantics.

* nd/attr-match-optim-more:
  attr: more matching optimizations from .gitignore
  gitignore: make pattern parsing code a separate function
  exclude: split pathname matching code into a separate function
  exclude: fix a bug in prefix compare optimization
  exclude: split basename matching code into a separate function
  exclude: stricten a length check in EXC_FLAG_ENDSWITH case
Merge branch 'nd/wildmatch' into next

Allows pathname patterns in .gitignore and .gitattributes files
with double-asterisks "foo/**/bar" to match any number of directory
hierarchies.

I suspect that this needs to be plugged to pathspec matching code;
otherwise "git log -- 'Docum*/**/*.txt'" would not show the log for
commits that touch Documentation/git.txt, which would be confusing
to the users.

* nd/wildmatch:
  Support "**" wildcard in .gitignore and .gitattributes
  wildmatch: make /**/ match zero or more directories
  wildmatch: adjust "**" behavior
  wildmatch: fix case-insensitive matching
  wildmatch: remove static variable force_lower_case
  wildmatch: make wildmatch's return value compatible with fnmatch
  t3070: disable unreliable fnmatch tests
  Integrate wildmatch to git
  wildmatch: follow Git's coding convention
  wildmatch: remove unnecessary functions
  Import wildmatch from rsync
  ctype: support iscntrl, ispunct, isxdigit and isprint
  ctype: make sane_ctype[] const array

Conflicts:
	Makefile
Merge branch 'mo/cvs-server-cleanup' into next

* mo/cvs-server-cleanup:
  cvsserver status: provide real sticky info
  cvsserver: cvs add: do not expand directory arguments
  cvsserver: use whole CVS rev number in-process; don't strip "1." prefix
  cvsserver: split up long lines in req_{status,diff,log}
  cvsserver: clean up client request handler map comments
  cvsserver: remove unused functions _headrev and gethistory
  cvsserver update: comment about how we shouldn't remove a user-modified file
  cvsserver: add comments about database schema/usage
  cvsserver: removed unused sha1Or-k mode from kopts_from_path
  cvsserver t9400: add basic 'cvs log' test
Merge branch 'jk/sh-setup-in-filter-branch' into next

Cleans up some duplicate ident-parsing code in the
filter-branch shell script.

Will merge to 'master' in the second batch after 1.8.0 ships.

* jk/sh-setup-in-filter-branch:
  filter-branch: use git-sh-setup's ident parsing functions
  git-sh-setup: refactor ident-parsing functions
Merge branch 'nd/status-long' into next

Allow an earlier "--short" option on the command line to be
countermanded with the "--long" option for "git status" and "git
commit".

Will merge to 'master' in the second batch after 1.8.0 ships.

* nd/status-long:
  status: add --long output format option
Merge branch 'rs/branch-del-symref' into next

A symbolic ref refs/heads/SYM was not correctly removed with
"git branch -d SYM"; the command removed the ref pointed by
SYM instead.

Will merge to 'master' in the second batch after 1.8.0 ships.

* rs/branch-del-symref:
  branch: show targets of deleted symrefs, not sha1s
  branch: skip commit checks when deleting symref branches
  branch: delete symref branch, not its target
  branch: factor out delete_branch_config()
  branch: factor out check_branch_commit()
Merge branch 'js/format-2047' into next

Fixes many rfc2047 quoting issues in the output from format-patch.

* js/format-2047:
  format-patch tests: check quoting/encoding in To: and Cc: headers
  format-patch: fix rfc2047 address encoding with respect to rfc822 specials
  format-patch: make rfc2047 encoding more strict
  format-patch: introduce helper function last_line_length()
  format-patch: do not wrap rfc2047 encoded headers too late
  format-patch: do not wrap non-rfc2047 headers too early
  utf8: fix off-by-one wrapping of text
Merge branch 'wtk/submodule-doc-fixup' into next

Minor formatting fixup in submodule docs.

* wtk/submodule-doc-fixup:
  git-submodule: wrap branch option with "<>" in usage strings.

Conflicts:
	Documentation/git-submodule.txt
	git-submodule.sh
Merge branch 'mm/maint-doc-remote-tracking' into next

We long ago hyphenated "remote-tracking branch"; this
catches some new instances added since then.

* mm/maint-doc-remote-tracking:
  Documentation: remote tracking branch -> remote-tracking branch
Merge branch 'po/maint-refs-replace-docs' into next

The refs/replace hierarchy was not mentioned in the
repository-layout docs.

* po/maint-refs-replace-docs:
  Doc repository-layout: Show refs/replace
Merge branch 'sl/maint-configure-messages' into next

Minor message fixes for the configure script.

* sl/maint-configure-messages:
  configure: fix some output message
Merge branch 'jk/config-ignore-duplicates' into next

Drop duplicate detection from git-config; this lets it
better match the internal config callbacks, which clears up
some corner cases with includes.

* jk/config-ignore-duplicates:
  git-config: use git_config_with_options
  git-config: do not complain about duplicate entries
  git-config: collect values instead of immediately printing
  git-config: fix regexp memory leaks on error conditions
  git-config: remove memory leak of key regexp
  t1300: test "git config --get-all" more thoroughly
  t1300: remove redundant test
  t1300: style updates