cleanup precompose_utf8

 - Remove extraneous parentheses and braces;

 - Remove redundant NUL-termination before strcpy();

 - Check result of unlink when probing for decomposed file names;

 - Adjust for the coding style by adding missing whitespaces;

 - Move storage class "static" at the beginning of the decl.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test: git-stash conflict sets up rerere

Add a test to make sure that a conflicted "stash apply" invokes
rerere to record the conflicts and resolve the the files it can
(the current code doesn't, so the test is marked as failing).

Without correct state recorded for rerere, mergetool may be
confused, causing it to think no files have conflicts even though
they do.  This condition is not verified by this test since a
subsequent commit will change the behavior to enable rerere for
stash conflicts.

Also, the next test expected us to finish up with a reset, which is
impossible to do if we fail (as we must) and it's an unreasonable
expectation anyway.  Begin the next test with a reset of its own
instead.

Signed-off-by: Phil Hord <hordp@cisco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
stash: invoke rerere in case of conflict

"stash apply" directly calls a backend merge function which does not
automatically invoke rerere.  This confuses mergetool when leftover
rerere state is left behind from previous merges.

Invoke rerere explicitly when we encounter a conflict during stash
apply.  This turns the test introduced by the previous commit to
succeed.

Signed-off-by: Phil Hord <hordp@cisco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: update the introductory section

The second paragraph in the git(1) description section were meant to
guide people who are not ready to dive into this page away from here.
Referring migrating CVS users to another page before they get
acquainted with Git was somewhat out of place.  Move the reference to
the "FURTHER DOCUMENTATION" section and push that section down.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-config.txt: fix example

The "--add" option is required to add a new value to a multivalued
configuration entry.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-config doc: unconfuse an example

One fictitious command "proxy-command" is enclosed inside a double
quote pair, while another fictitious command "default-proxy" is not
in the example, but the quoting does not change anything in the pair
of examples.  Remove the quotes to avoid unnecessary confusion.

Noticed by Michael Haggerty.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
precompose-utf8: do not call checks for non-ascii "utf8"

As suggested by Linus, this function is not checking UTF-8-ness of the
string; it only is seeing if it is pure US-ASCII.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/test-prereq' into next

Teaches the test framework to probe rarely used prerequistes lazily,
and make use of it for detecting SYMLINKS, CASE_INSENSITIVE_FS and
NKD/NKC MacOS x gotcha.

* jc/test-prereq:
  fixup! t3910: use the UTF8_NFD_TO_NFC test prereq
  t3910: use the UTF8_NFD_TO_NFC test prereq
  test-lib: provide UTF8 behaviour as a prerequisite
  t0050: use the SYMLINKS test prereq
  t0050: use the CASE_INSENSITIVE_FS test prereq
  test-lib: provide case insensitivity as a prerequisite
  test: allow prerequisite to be evaluated lazily
  test: rename $satisfied to $satisfied_prereq
Merge branch 'pg/maint-apply-remove-unused-variable' into next

Remove an unused field.

* pg/maint-apply-remove-unused-variable:
  apply: delete unused deflate_origlen from patch struct
Merge branch 'mk/test-seq' into next

Add a compatibility/utility function to the test framework.

* mk/test-seq:
  tests: Introduce test_seq
Merge branch 'nd/index-errno' into next

Assignments to errno before calling system functions that used to
matter in the old code were left behind after the code structure
changed sufficiently to make them useless.

* nd/index-errno:
  read_index_from: remove bogus errno assignments
Merge branch 'tr/maint-send-email-2047' into next

"git send-email" did not unquote encoded words that appear on the
header correctly, and lost "_" from strings.

* tr/maint-send-email-2047:
  send-email: improve RFC2047 quote parsing
Merge branch 'mm/die-with-dashdash-help' into next

Reword error messages.

* mm/die-with-dashdash-help:
  setup: clarify error messages for file/revisions ambiguity
Merge branch 'tr/merge-recursive-flush' into next

Remove unnecessary code.

* tr/merge-recursive-flush:
  merge-recursive: eliminate flush_buffer() in favor of write_in_full()
Merge branch 'tr/void-diff-setup-done' into next

Remove unnecessary code.

* tr/void-diff-setup-done:
  diff_setup_done(): return void
Merge branch 'js/gitweb-path-info-unquote' into next

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 'jc/tag-doc' into next

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.

* jc/tag-doc:
  Documentation: do not mention .git/refs/* directories
Merge branch 'jk/check-docs-update' into next

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 'hv/coding-guidelines' into next

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

* hv/coding-guidelines:
  Documentation/CodingGuidelines: spell out more shell guidelines
Merge branch 'jc/maint-rev-list-topo-doc' into next

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

* jc/maint-rev-list-topo-doc:
  rev-list docs: clarify --topo-order description