Merge branch 'nd/fetch-into-shallow' into jch

When there is no sufficient overlap between old and new history
during a fetch into a shallow repository, we unnecessarily sent
objects the sending side knows the receiving end has.

* nd/fetch-into-shallow:
  Add testcase for needless objects during a shallow fetch
  list-objects: mark more commits as edges in mark_edges_uninteresting
  list-objects: reduce one argument in mark_edges_uninteresting
  upload-pack: delegate rev walking in shallow fetch to pack-objects
  shallow: add setup_temporary_shallow()
  shallow: only add shallow graft points to new shallow file
  move setup_alternate_shallow and write_shallow_commits to shallow.c

# Conflicts:
# 	fetch-pack.c
Merge branch 'jx/branch-vv-always-compare-with-upstream' into jch

"git branch -v -v" (and "git status") did not distinguish among a
branch that does not build on any other branch, a branch that is in
sync with the branch it builds on, and a branch that is configured
to build on some other branch that no longer exists.

* jx/branch-vv-always-compare-with-upstream:
  status: always show tracking branch even no change
  branch: report invalid tracking branch as gone
Merge branch 'rh/peeling-tag-to-tag' into jch

Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
"foo" is not a tag.

* rh/peeling-tag-to-tag:
  peel_onion: do not assume length of x_type globals
  peel_onion(): add support for <rev>^{tag}
Merge branch 'mm/status-without-comment-char' into jch

Allow "git status" to omit the prefix to make its output a comment
in a commit log editor, which is not necessary for human
consumption.

We may want to tighten the output to omit unnecessary trailing
blank lines, but that does not have to be in the scope of this
series.

* mm/status-without-comment-char:
  t7508: avoid non-portable sed expression
  status: add missing blank line after list of "other" files
  tests: don't set status.displayCommentPrefix file-wide
  status: disable display of '#' comment prefix by default
  submodule summary: ignore --for-status option
  wt-status: use argv_array API
  builtin/stripspace.c: fix broken indentation
Merge branch 'hu/cherry-pick-previous-branch' into jch

Just like "git checkout -" knows to check out and "git merge -"
knows to merge the branch you were previously on, teach "git
cherry-pick" to understand "-" as the previous branch.

* hu/cherry-pick-previous-branch:
  cherry-pick: allow "-" as abbreviation of '@{-1}'
Merge branch 'np/lookup-object-hashing' into jch

Micro optimize hash function used in the object hash table.

* np/lookup-object-hashing:
  lookup_object: remove hashtable_index() and optimize hash_obj()
Merge branch 'bc/http-backend-allow-405' into jch

When the webserver responds with "405 Method Not Allowed", it
should tell the client what methods are allowed with the "Allow"
header.

* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405
Merge branch 'jh/checkout-auto-tracking' into jch

Fix a minor regression in v1.8.3.2 and later that made it
impossible to base your local work on anything but a local branch
of the upstream repository you are tracking from.

* jh/checkout-auto-tracking:
  t3200: fix failure on case-insensitive filesystems
  branch.c: Relax unnecessary requirement on upstream's remote ref name
  t3200: Add test demonstrating minor regression in 41c21f2
  Refer to branch.<name>.remote/merge when documenting --track
  t3200: Minor fix when preparing for tracking failure
  t2024: Fix &&-chaining and a couple of typos
Merge branch 'mm/rebase-continue-freebsd-WB' into jch

Work around a bug in FreeBSD shell that caused a regression to "git
rebase" in v1.8.4.  It would be lovely to hear from FreeBSD folks a
success report to make sure we didn't miss any other use of a bare
"return" from dot-sourced script.

* mm/rebase-continue-freebsd-WB:
  rebase: fix run_specific_rebase's use of "return" on FreeBSD

# Conflicts:
# 	git-rebase.sh
Merge branch 'nr/git-cd-to-a-directory' into jch

Just like "make -C <directory>", make "git -C <directory> ..." to
go there before doing anything else.

* nr/git-cd-to-a-directory:
  t0056: "git -C" test updates
  git: run in a directory given with -C option
Merge branch 'bk/refs-multi-update' into jch

Give "update-refs" a "--stdin" option to read multiple update
requests and perform them in an all-or-none fashion.

* bk/refs-multi-update:
  update-ref: add test cases covering --stdin signature
  update-ref: support multiple simultaneous updates
  refs: add update_refs for multiple simultaneous updates
  refs: add function to repack without multiple refs
  refs: factor delete_ref loose ref step into a helper
  refs: factor update_ref steps into helpers
  refs: report ref type from lock_any_ref_for_update
  reset: rename update_refs to reset_refs

# Conflicts:
# 	builtin/update-ref.c
# 	refs.c
Merge branch 'mm/commit-template-squelch-advice-messages' into jch

From the commit log template, remove irrelevant "advice" messages
that are shared with "git status" output.

* mm/commit-template-squelch-advice-messages:
  commit: disable status hints when writing to COMMIT_EDITMSG
  wt-status: turn advice_status_hints into a field of wt_status
  commit: factor status configuration is a helper function

# Conflicts:
# 	builtin/commit.c
Merge branch 'dw/check-ignore-sans-index' into jch

"git check-ignore" follows the same rule as "git add" and "git
status" in that the ignore/exclude mechanism does not take effect
on paths that are already tracked.  With "--no-index" option, it
can be used to diagnose which paths that should have been ignored
have been mistakenly added to the index.

* dw/check-ignore-sans-index:
  check-ignore: Add option to ignore index contents
Merge branch 'fc/at-head' into jch

Attempt to resurrect "Type @ for HEAD"; the bottom one seems to be
a genuine code improvement, but identifying cases where "@" means
HEAD were harder than it should have been.  I think the result of
squashing the tip one in covers all the necessary cases.

* fc/at-head:
  Add new @ shortcut for HEAD
  sha1-name: pass len argument to interpret_branch_name()
### fifth batch
Merge branch 'jk/upload-pack-keepalive' into jch

When running "fetch -q", a long silence while the sender side
computes the set of objects to send can be mistaken by proxies as
dropped connection.

* jk/upload-pack-keepalive:
  upload-pack: bump keepalive default to 5 seconds
  upload-pack: send keepalive packets during pack computation
Merge branch 'cc/replace-with-the-same-type' into jch

Using the replace mechanism to swap an object with another object
of a different type can introduce inconsistency (e.g. a tree
expects an object name to refer to a blob, but the blob object can
be mistakenly or maliciously replaced with an object with a
different type). Attempt to forbid such.

* cc/replace-with-the-same-type:
  Doc: 'replace' merge and non-merge commits
  t6050-replace: use some long option names
  replace: allow long option names
  Documentation/replace: add Creating Replacement Objects section
  t6050-replace: add test to clean up all the replace refs
  t6050-replace: test that objects are of the same type
  Documentation/replace: state that objects must be of the same type
  replace: forbid replacing an object with one of a different type

# Conflicts:
# 	builtin/replace.c
Merge branch 'kb/msvc-compile' into jch

Build updates for Windows port.

* kb/msvc-compile:
  Windows: do not redefine _WIN32_WINNT
  MinGW: Fix stat definitions to work with MinGW runtime version 4.0
  MSVC: fix stat definition hell
  MSVC: fix compile errors due to macro redefinitions
  MSVC: fix compile errors due to missing libintl.h
Merge branch 'lc/filter-branch-too-many-refs' into jch

"git filter-branch" in a repository with many refs blew limit of
command line length.

* lc/filter-branch-too-many-refs:
  Allow git-filter-branch to process large repositories with lots of branches.
Merge branch 'nd/unpack-entry-optim-in-pack-objects' into jch

The codepath to use data from packfiles that is only exercised in
pack-objects unnecessarily checked crc checksum of the pack data,
even when it ends up using in-core copy that it got by reading from
the pack (at which point the checksum was validated).

* nd/unpack-entry-optim-in-pack-objects:
  pack-objects: no crc check when the cached version is used