mingw: activate alloca

Both MSVC and MINGW have alloca(3) definitions in malloc.h, so by moving
win32-compat alloca.h from compat/vcbuild/include/ to compat/win32/ ,
which is included by both MSVC and MINGW CFLAGS, we can make alloca()
work on both those Windows environments.

In MINGW, malloc.h has explicit check for GNUC and if it is so, defines
alloca to __builtin_alloca, so it looks like we don't need to add any
code to here-shipped alloca.h to get optimum performance.

Compile-tested on Windows in MSysGit.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
doc/http-backend: missing accent grave in literal mark-up

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge commit 'doc/http-backend: missing accent grave in literal mark-up'

* commit '5df05146d5cb94628a3dfc53063c802ee1152cec':
  doc/http-backend: missing accent grave in literal mark-up
Merge branch 'jc/fix-diff-no-index-diff-opt-parse' into maint

* jc/fix-diff-no-index-diff-opt-parse:
  diff-no-index: correctly diagnose error return from diff_opt_parse()
Merge branch 'jk/commit-dates-parsing-fix' into maint

* jk/commit-dates-parsing-fix:
  t4212: loosen far-in-future test for AIX
  date: recognize bogus FreeBSD gmtime output
Merge branch 'mh/update-ref-batch-create-fix' into maint

* mh/update-ref-batch-create-fix:
  update-ref: fail create operation over stdin if ref already exists
Merge branch 'cn/fetch-prune-overlapping-destination' into maint

* cn/fetch-prune-overlapping-destination:
  fetch: handle overlaping refspecs on --prune
  fetch: add a failing test for prunning with overlapping refspecs
Merge branch 'jl/nor-or-nand-and' into maint

* jl/nor-or-nand-and:
  code and test: fix misuses of "nor"
  comments: fix misuses of "nor"
  contrib: fix misuses of "nor"
  Documentation: fix misuses of "nor"
Git 1.9.2

The second maintenance release for Git 1.9; contains all the fixes
that are scheduled to appear in Git 2.0.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sync with 1.9.2

* maint:
  Git 1.9.2
  doc/http-backend: missing accent grave in literal mark-up
Merge branch 'ks/tree-diff-nway' into jch

Instead of running N pair-wise diff-trees when inspecting a
N-parent merge, find the set of paths that were touched by walking
N+1 trees in parallel.  These set of paths can then be turned into
N pair-wise diff-tree results to be processed through rename
detections and such.  And N=2 case nicely degenerates to the usual
2-way diff-tree, which is very nice.

* ks/tree-diff-nway:
  mingw: activate alloca
  combine-diff: speed it up, by using multiparent diff tree-walker directly
  tree-diff: rework diff_tree() to generate diffs for multiparent cases as well
  Portable alloca for Git
  tree-diff: reuse base str(buf) memory on sub-tree recursion
  tree-diff: no need to call "full" diff_tree_sha1 from show_path()
  tree-diff: rework diff_tree interface to be sha1 based
  tree-diff: diff_tree() should now be static
  tree-diff: remove special-case diff-emitting code for empty-tree cases
  tree-diff: simplify tree_entry_pathcmp
  tree-diff: show_path prototype is not needed anymore
  tree-diff: rename compare_tree_entry -> tree_entry_pathcmp
  tree-diff: move all action-taking code out of compare_tree_entry()
  tree-diff: don't assume compare_tree_entry() returns -1,0,1
  tree-diff: consolidate code for emitting diffs and recursion in one place
  tree-diff: show_tree() is not needed
  tree-diff: no need to pass match to skip_uninteresting()
  tree-diff: no need to manually verify that there is no mode change for a path
  combine-diff: move changed-paths scanning logic into its own function
  combine-diff: move show_log_first logic/action out of paths scanning
Merge branch 'as/grep-fullname-config' into jch

Add a configuration variable to force --full-name to be default for
"git grep".

This may cause regressions on scripted users that do not expect
this new behaviour.

* as/grep-fullname-config:
  grep: add grep.fullName config variable
Merge branch 'jc/apply-ignore-whitespace' into jch

"--ignore-space-change" option of "git apply" ignored the
spaces at the beginning of line too aggressively, which is
inconsistent with the option of the same name "diff" and "git diff"
have.

* jc/apply-ignore-whitespace:
  apply --ignore-space-change: lines with and without leading whitespaces do not match
Merge branch 'mt/patch-id-stable' into jch

Introduce a new way to compute patch-id for a patch that is not
affected by the order of the paths that appear in the input.

This changes the generated patch-id unless the users add an extra
option to their command lines, but I deliberately queued the series
to 'next' without reverting that compatibility breakage to see if
people complain.  It could be that we do not have to worry about
the default flipping at all.  We'll see.

* mt/patch-id-stable:
  patch-id-test: test --stable and --unstable flags
  patch-id: document new behaviour
  patch-id: make it stable against hunk reordering
### match next
Merge branch 'cc/interpret-trailers' into jch

A new filter to programatically edit the tail end of the commit log
messages.

I was planning to merge it to 'next' and keep it there for the
remainder of this cycle, but it appears that there still will be
another round of reroll, at least for the documentation?

* cc/interpret-trailers:
  trailer: add blank line before the trailers if needed
  Documentation: add documentation for 'git interpret-trailers'
  trailer: add tests for commands in config file
  trailer: execute command from 'trailer.<name>.command'
  trailer: add tests for "git interpret-trailers"
  trailer: add interpret-trailers command
  trailer: put all the processing together and print
  trailer: parse trailers from stdin
  trailer: process command line trailer arguments
  trailer: read and process config information
  trailer: process trailers from stdin and arguments
  trailer: add data structures and basic functions
Merge branch 'nd/multiple-work-trees' into jch

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.

Will hold.

* nd/multiple-work-trees: (28 commits)
  count-objects: report unused files in $GIT_DIR/repos/...
  gc: support prune --repos
  gc: style change -- no SP before closing bracket
  prune: strategies for linked checkouts
  checkout: detach if the branch is already checked out elsewhere
  checkout: clean up half-prepared directories in --to mode
  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
  git-stash: avoid hardcoding $GIT_DIR/logs/....
  *.sh: avoid hardcoding $GIT_DIR/hooks/...
  git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects
  $GIT_COMMON_DIR: a new environment variable
  commit: use SEQ_DIR instead of hardcoding "sequencer"
  fast-import: use git_path() for accessing .git dir instead of get_git_dir()
  ...

# Conflicts:
# 	builtin/repack.c
Merge branch 'mh/ref-transaction' into jch

Update "update-ref --stdin [-z]" and then introduce a transactional
support for (multi-)reference updates.

Will wait for a few days to give other reviewers time to comment,
and then hopefully we can merge it to 'next' and keep it there for
the remainder of this cycle.

* mh/ref-transaction: (27 commits)
  ref_transaction_commit(): work with transaction->updates in place
  struct ref_update: add a type field
  struct ref_update: add a lock field
  ref_transaction_commit(): simplify code using temporary variables
  struct ref_update: store refname as a FLEX_ARRAY
  struct ref_update: rename field "ref_name" to "refname"
  refs: remove API function update_refs()
  update-ref --stdin: reimplement using reference transactions
  refs: add a concept of a reference transaction
  update-ref --stdin: harmonize error messages
  update-ref --stdin: improve the error message for unexpected EOF
  t1400: test one mistake at a time
  update-ref --stdin -z: deprecate interpreting the empty string as zeros
  update-ref.c: extract a new function, parse_next_sha1()
  t1400: test that stdin -z update treats empty <newvalue> as zeros
  update-ref --stdin: simplify error messages for missing oldvalues
  update-ref --stdin: make error messages more consistent
  update-ref --stdin: improve error messages for invalid values
  update-ref.c: extract a new function, parse_refname()
  parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice
  ...

# Conflicts:
# 	builtin/update-ref.c
# 	refs.h
Merge branch 'jl/status-added-submodule-is-never-ignored' into jch

* jl/status-added-submodule-is-never-ignored:
  commit -m: commit staged submodules regardless of ignore config
  status/commit: show staged submodules regardless of ignore config
Merge branch 'mh/lockfile' into jch

Refactor and fix corner-case bugs in the lockfile API.

* mh/lockfile: (25 commits)
  trim_last_path_elm(): replace last_path_elm()
  resolve_symlink(): take a strbuf parameter
  resolve_symlink(): use a strbuf for internal scratch space
  Change lock_file::filename into a strbuf
  commit_lock_file(): use a strbuf to manage temporary space
  try_merge_strategy(): use a statically-allocated lock_file object
  try_merge_strategy(): remove redundant lock_file allocation
  lockfile: avoid transitory invalid states
  commit_lock_file(): make committing an unlocked lockfile a NOP
  commit_lock_file(): inline temporary variable
  remove_lock_file(): call rollback_lock_file()
  lock_file(): exit early if lockfile cannot be opened
  write_packed_entry_fn(): convert cb_data into a (const int *)
  prepare_index(): declare return value to be (const char *)
  delete_ref_loose(): don't muck around in the lock_file's filename
  lockfile: define a constant LOCK_SUFFIX_LEN
  lockfile.c: document the various states of lock_file objects
  struct lock_file: replace on_list field with flags field
  lock_file(): always add lock_file object to lock_file_list
  hold_lock_file_for_append(): release lock on errors
  ...