SQUASH???
t: support clang/gcc AddressSanitizer

When git is compiled with "-fsanitize=address" (using clang
or gcc >= 4.8), all invocations of git will check for buffer
overflows. This is similar to running with valgrind, except
that it is more thorough (because of the compiler support,
function-local buffers can be checked, too) and runs much
faster (making it much less painful to run the whole test
suite with the checks turned on).

Unlike valgrind, the magic happens at compile-time, so we
don't need the same infrastructure in the test suite that we
did to support --valgrind. But there are two things we can
help with:

  1. On some platforms, the leak-detector is on by default,
     and causes every invocation of "git init" (and thus
     every test script) to fail. Since running git with
     the leak detector is pointless, let's shut it off
     automatically in the tests, unless the user has already
     configured it.

  2. When apache runs a CGI, it clears the environment of
     unknown variables. This means that the $ASAN_OPTIONS
     config doesn't make it to git-http-backend, and it
     dies due to the leak detector. Let's mark the variable
     as OK for apache to pass.

With these two changes, running

    make CC=clang CFLAGS=-fsanitize=address test

works out of the box.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index-format.txt: add a missing closing quote

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/t9001-modernise' into pu

* jc/t9001-modernise:
  t9001: style modernisation phase #5
  t9001: style modernisation phase #4
  t9001: style modernisation phase #3
  t9001: style modernisation phase #2
  t9001: style modernisation phase #1
  git-send-email: add --transfer-encoding option
  git-send-email: delay creation of MIME headers
Merge branch 'lh/send-email-hide-x-mailer' into pu

"git send-email" normally identifies itself via X-Mailer: header
in the message it sends out.  A new command line flag allows the
header to be squelched.

* lh/send-email-hide-x-mailer:
  SQUASH???
  test/send-email: --[no-]xmailer tests
  SQUASH???
  send-email: add --[no-]xmailer option
Merge branch 'mg/add-ignore-errors' into pu

* mg/add-ignore-errors:
  add: ignore only ignored files
Merge branch 'tb/config-core-filemode-check-on-broken-fs' into pu

* tb/config-core-filemode-check-on-broken-fs:
  init-db: improve the filemode trustability check
Merge branch 'jc/refer-to-t-readme-from-submitting-patches' into pu

* jc/refer-to-t-readme-from-submitting-patches:
  t/README: justify why "! grep foo" is sufficient
  SubmittingPatches: refer to t/README for tests
Merge branch 'js/t5000-dont-copy-bin-sh' into pu

* js/t5000-dont-copy-bin-sh:
  t5000 on Windows: do not mistake "sh.exe" as "sh"
Merge branch 'rj/no-xopen-source-for-cygwin' into pu

* rj/no-xopen-source-for-cygwin:
  git-compat-util.h: don't define _XOPEN_SOURCE on cygwin
Merge branch 'dw/shell-basename-dashdash-before-stripping-leading-dash-from-login' into pu

* dw/shell-basename-dashdash-before-stripping-leading-dash-from-login:
  git-sh-setup.sh: use dashdash with basename call
Merge branch 'pb/am-message-id-footer' into pu

* pb/am-message-id-footer:
  git-am: add --message-id/--no-message-id
  git-mailinfo: add --message-id
Merge branch 'mh/find-uniq-abbrev' into pu

* mh/find-uniq-abbrev:
  sha1_name: avoid unnecessary sha1 lookup in find_unique_abbrev
Merge branch 'jc/exec-cmd-system-path-leak-fix' into pu

The function sometimes returned a non-freeable memory and some
other times returned a piece of memory that must be freed.

* jc/exec-cmd-system-path-leak-fix:
  system_path(): always return free'able memory to the caller
Merge branch 'nd/multiple-work-trees' into pu

A replacement for contrib/workdir/git-new-workdir that does not
rely on symbolic links and make sharing of objects and refs safer
by making the borrowee and borrowers aware of each other.

* nd/multiple-work-trees: (34 commits)
  git-common-dir: make "modules/" per-working-directory directory
  checkout: do not fail if target is an empty directory
  t2025: add a test to make sure grafts is working from a linked checkout
  checkout: don't require a work tree when checking out into a new one
  git_path(): keep "info/sparse-checkout" per work-tree
  count-objects: report unused files in $GIT_DIR/worktrees/...
  gc: support prune --worktrees
  gc: factor out gc.pruneexpire parsing code
  gc: style change -- no SP before closing parenthesis
  checkout: clean up half-prepared directories in --to mode
  checkout: reject if the branch is already checked out elsewhere
  prune: strategies for linked checkouts
  checkout: support checking out into a new working directory
  use new wrapper write_file() for simple file writing
  wrapper.c: wrapper to open a file, fprintf then close
  setup.c: support multi-checkout repo setup
  setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()
  setup.c: convert check_repository_format_gently to use strbuf
  setup.c: detect $GIT_COMMON_DIR in is_git_directory()
  setup.c: convert is_git_directory() to use strbuf
  ...
Merge branch 'nd/list-files' into pu

A new "git list-files" Porcelain command, "ls-files" with bells and
whistles.

* nd/list-files:
  list-files: -M aka diff-cached
  list-files -F: show submodules with the new indicator '&'
  list-files: add -F/--classify
  list-files: show directories as well as files
  list-files: do not show duplicate cached entries
  list-files: sort output and remove duplicates
  list-files: add -t back
  list-files: add -1 short for --no-column
  list-files: add -R/--recursive short for --max-depth=-1
  list-files: -u does not imply showing stages
  list-files: a user friendly version of ls-files and more
  ls-files: support --max-depth
  ls-files: add --column
  ls-files: add --color to highlight file names
  ls-files: buffer full item in strbuf before printing
  ls_colors.c: highlight submodules like directories
  ls_colors.c: add a function to color a file name
  ls_colors.c: parse color.ls.* from config file
  ls_colors.c: add $LS_COLORS parsing code
Merge branch 'jc/push-to-checkout' into pu

Extending the js/push-to-deploy topic, the behaviour of "git push"
when updating the working tree and the index with an update to the
branch that is checked out can be tweaked by push-to-checkout hook.

* jc/push-to-checkout:
  receive-pack: support push-to-checkout hook
  receive-pack: refactor updateInstead codepath
###
Merge branch 'nd/untracked-cache' into pu

Comments?

* nd/untracked-cache:
  t7063: tests for untracked cache
  update-index: test the system before enabling untracked cache
  update-index: manually enable or disable untracked cache
  status: enable untracked cache
  untracked cache: mark index dirty if untracked cache is updated
  untracked cache: print stats with $GIT_TRACE_UNTRACKED_STATS
  untracked cache: avoid racy timestamps
  read-cache.c: split racy stat test to a separate function
  untracked cache: invalidate at index addition or removal
  untracked cache: load from UNTR index extension
  untracked cache: save to an index extension
  untracked cache: don't open non-existent .gitignore
  untracked cache: mark what dirs should be recursed/saved
  untracked cache: record/validate dir mtime and reuse cached output
  untracked cache: make a wrapper around {open,read,close}dir()
  untracked cache: invalidate dirs recursively if .gitignore changes
  untracked cache: initial untracked cache validation
  untracked cache: record .gitignore information and dir hierarchy
  dir.c: optionally compute sha-1 of a .gitignore file
Merge branch 'pw/remote-set-url-fetch' into pu

Still under discussion.

* pw/remote-set-url-fetch:
  remote: add --fetch and --both options to set-url