Merge branch 'jl/submodule-rm'

* jl/submodule-rm:
  docs: move submodule section
Merge branch 'cn/config-missing-path'

"git config --path $key" segfaulted on "[section] key" (a boolean
"true" spelled without "=", not "[section] key = true").

* cn/config-missing-path:
  config: don't segfault when given --path with a missing value
Merge branch 'jk/checkout-out-of-unborn'

* jk/checkout-out-of-unborn:
  checkout: print a message when switching unborn branches
Merge branch 'ml/cygwin-mingw-headers'

Make git compile on cygwin with newer header files.

* ml/cygwin-mingw-headers:
  USE CGYWIN_V15_WIN32API as macro to select api for cygwin
  Update cygwin.c for new mingw-64 win32 api headers
Sixth batch for 1.8.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
remote-curl.c: Fix a compiler warning

In particular, gcc issues an "'gzip_size' might be used uninitialized"
warning (-Wuninitialized). However, this warning is a false positive,
since the 'gzip_size' variable would not, in fact, be used uninitialized.
In order to suppress the warning, we simply initialise the variable to
zero in it's declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb: make remote_heads config setting work

Git configuration items can not contain underscores in their section
and bottom-level variable name; the 'remote_heads' feature can not
be enabled on a per-repository basis with that name.

This changes the git-config option to be `gitweb.remoteheads` but does
not change the gitweb.conf option, to avoid backwards compatibility
issues.  We strip underscores from keys before looking through
git-config output for them.

An existing check on keynames was overly eager to reject non-word
letters, but if we ever start using three-level names, the middle
level string can contain almost anything, so fix that as well while
we are in the vicinity.

Signed-off-by: Phil Pennock <phil@apcera.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/maint-http-half-auth-fetch'

Finishing touches to squelch a compiler warning.

* jk/maint-http-half-auth-fetch:
  remote-curl.c: Fix a compiler warning
Merge branch 'jk/config-ignore-duplicates'

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

* 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 'so/prompt-command'

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

* wtk/submodule-doc-fixup:
  git-submodule: wrap branch option with "<>" in usage strings.
Merge branch 'esr/maint-doc-fast-import'

* esr/maint-doc-fast-import:
  doc/fast-import: clarify how content states are built
Update draft release notes for 1.8.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
l10n: Update git.pot (14 new, 3 removed messages)

Generate po/git.pot from v1.8.0-273-g2d242, and there are 14 new and 3
removed messages.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
l10n: vi.po: update to git-v1.7.12-437-g1084f

 * updated all new messages (1967t0f0u)
 * make quote become more good-looking

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
l10n: Update Swedish translation (1975t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
l10n: vi.po: Update follow git-v1.8.0-273-g2d242

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Teach rm to remove submodules when given with a trailing '/'

Doing a "git rm submod/" on a submodule results in an error:
	fatal: pathspec 'submod/' did not match any files
This is really inconvenient as e.g. using TAB completion in a shell on a
submodule automatically adds the trailing '/' when it completes the path
of the submodule directory. The user has then to remove the '/' herself to
make a "git rm" succeed. Doing a "git rm -r somedir/" is working fine, so
there is no reason why that shouldn't work for submodules too.

Teach git rm to not error out when a '/' is appended to the path of a
submodule. Achieve this by chopping off trailing slashes from the path
names given if they represent directories. Add tests to make sure that
logic only applies to directories and not to files.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>