Merge branch 'so/prompt-command' into jch

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.

Will cook in 'next'.

* 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 'nd/wildmatch' into jch

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.

Will cook in 'next'.

* 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 'wtk/submodule-doc-fixup' into jch

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

Conflicts:
	Documentation/git-submodule.txt
	git-submodule.sh
Merge branch 'jk/config-ignore-duplicates' into jch

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

Will merge to 'master' in the sixth batch.

* jk/config-ignore-duplicates:
  builtin/config.c: Fix a sparse warning
  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
Merge branch 'rc/maint-complete-git-p4' into jch

Comment from Pete will need to be addressed in a follow-up patch.

* rc/maint-complete-git-p4:
  Teach git-completion about git p4
Merge branch 'sg/complete-help-undup' into jch

Will merge to 'master' in the seventh batch.

* sg/complete-help-undup:
  completion: remove 'help' duplicate from porcelain commands
Merge branch 'fc/remote-hg' into jch

New remote helper for hg.

Will merge to 'master' in the seventh batch.

* fc/remote-hg:
  remote-hg: avoid bad refs
  remote-hg: try the 'tip' if no checkout present
  remote-hg: fix compatibility with older versions of hg
  remote-hg: add missing config for basic tests
  remote-hg: the author email can be null
  remote-hg: add option to not track branches
  remote-hg: add extra author test
  remote-hg: add tests to compare with hg-git
  remote-hg: add bidirectional tests
  test-lib: avoid full path to store test results
  remote-hg: add basic tests
  remote-hg: fake bookmark when there's none
  remote-hg: add compat for hg-git author fixes
  remote-hg: add support for hg-git compat mode
  remote-hg: match hg merge behavior
  remote-hg: make sure the encoding is correct
  remote-hg: add support to push URLs
  remote-hg: add support for remote pushing
  remote-hg: add support for pushing
  Add new remote-hg transport helper
Merge branch 'fc/remote-bzr' into jch

New remote helper for bzr.

Will merge to 'master' in the seventh batch.

* fc/remote-bzr:
  remote-bzr: update working tree
  remote-bzr: add support for remote repositories
  remote-bzr: add support for pushing
  remote-bzr: add simple tests
  Add new remote-bzr transport helper
Merge branch 'bc/do-not-recurse-in-die' into jch

Will merge to 'master' in the seventh batch.

* bc/do-not-recurse-in-die:
  usage.c: detect recursion in die routines and bail out immediately
Merge branch 'jh/update-ref-d-through-symref' into jch

"update-ref -d --deref SYM" to delete a ref through a symbolic ref
that points to it did not remove it correctly.

Will merge to 'master' in the seventh batch.

* jh/update-ref-d-through-symref:
  Fix failure to delete a packed ref through a symref
  t1400-update-ref: Add test verifying bug with symrefs in delete_ref()
Merge branch 'rr/submodule-diff-config' into jch

Lets "git diff --submodule=log" become the default via configuration.

Will merge to 'master' in the seventh batch.

* rr/submodule-diff-config:
  submodule: display summary header in bold
  diff: rename "set" variable
  diff: introduce diff.submodule configuration variable
  Documentation: move diff.wordRegex from config.txt to diff-config.txt
Merge branch 'mk/complete-tcsh' into jch

Will merge to 'master' in the seventh batch.

* mk/complete-tcsh:
  tcsh-completion re-using git-completion.bash
Merge branch 'lt/diff-stat-show-0-lines' into jch

We failed to mention a file without any content change but whose
permission bit was modified, or (worse yet) a new file without any
content in the "git diff --stat" output.

Will merge to 'master' in the seventh batch.

* lt/diff-stat-show-0-lines:
  Fix "git diff --stat" for interesting - but empty - file changes
test-wildmatch: avoid Windows path mangling

The MSYS bash mangles arguments that begin with a forward slash
when they are passed to test-wildmatch. This causes tests to fail.
Avoid mangling by prepending "XXX", which is removed by
test-wildmatch before further processing.

[J6t: reworded commit message]

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
compat/fnmatch: fix off-by-one character class's length check

Character class "xdigit" is the only one that hits 6 character limit
defined by CHAR_CLASS_MAX_LENGTH. All other character classes are 5
character long and therefore never caught by this.

This should make xdigit tests in t3070 pass on Windows.

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'nd/maint-compat-fnmatch-fix' into jch

* nd/maint-compat-fnmatch-fix:
  compat/fnmatch: fix off-by-one character class's length check
Merge branch 'nd/wildmatch' into jch

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.

Will cook in 'next'.

* nd/wildmatch:
  test-wildmatch: avoid Windows path mangling
Merge branch 'fc/remote-testgit-feature-done' into jch

Is this still in "Needs review" state?  Are people involved in the
remote interface happy with this change?

* fc/remote-testgit-feature-done:
  remote-testgit: properly check for errors
Merge branch 'fc/completion-test-simplification' into jch

Clean up completion tests.  Use of conslidated helper may make
instrumenting one particular test during debugging of the test
itself, but I think that issue should be addressed in some other
way (e.g. making sure individual tests in 9902 can be skipped).

* fc/completion-test-simplification:
  completion: simplify __gitcomp() test helper
  completion: refactor __gitcomp related tests
  completion: consolidate test_completion*() tests
  completion: simplify tests using test_completion_long()
  completion: standardize final space marker in tests
  completion: add comment for test_completion()
Merge branch 'jk/pickaxe-textconv' into jch

Use textconv filters when searching with "log -S".

Will merge to 'next'.

* jk/pickaxe-textconv:
  pickaxe: use textconv for -S counting
  pickaxe: hoist empty needle check