Merge branch 'jk/write-packed-refs-via-stdio'

Optimize the code path to write out the packed-refs file, which
especially matters in a repository with a large number of refs.

* jk/write-packed-refs-via-stdio:
  refs: write packed_refs file using stdio
Merge branch 'jk/faster-name-conflicts'

Optimize the check to see if a ref $F can be created by making sure
no existing ref has $F/ as its prefix, which especially matters in
a repository with a large number of existing refs.

* jk/faster-name-conflicts:
  refs: speed up is_refname_available
Merge branch 'js/fsck-tag-validation'

Teach "git fsck" to inspect the contents of annotated tag objects.

* js/fsck-tag-validation:
  Make sure that index-pack --strict checks tag objects
  Add regression tests for stricter tag fsck'ing
  fsck: check tag objects' headers
  Make sure fsck_commit_buffer() does not run out of the buffer
  fsck_object(): allow passing object data separately from the object itself
  Refactor type_from_string() to allow continuing after detecting an error
Merge branch 'jc/hash-object'

"hash-object" learned a new "--literally" option to hash any random
garbage into a loose object, to allow us to create a test data for
mechanisms to catch corrupt objects.

* jc/hash-object:
  hash-object: add --literally option
  hash-object: pass 'write_object' as a flag
  hash-object: reduce file-scope statics
Merge branch 'jc/hash-object-fsck-tag'

Using "hash-object --literally", test one of the new breakages
js/fsck-tag-validation topic teaches "fsck" to catch is caught.

* jc/hash-object-fsck-tag:
  t1450: make sure fsck detects a malformed tagger line
Merge branch 'jk/prune-packed-server-info'

Code cleanup.

* jk/prune-packed-server-info:
  repack: call prune_packed_objects() and update_server_info() directly
  server-info: clean up after writing info/packs
  make update-server-info more robust
  prune-packed: fix minor memory leak
Merge branch 'jc/ignore-sigpipe-while-running-hooks'

pre- and post-receive hooks are no longer required to read all
their inputs.

* jc/ignore-sigpipe-while-running-hooks:
  receive-pack: allow hooks to ignore its standard input stream
Merge branch 'jk/close-stderr-of-credential-cache-deamon'

Plug fd leaks.

* jk/close-stderr-of-credential-cache-deamon:
  credential-cache: close stderr in daemon process
Merge branch 'rs/realloc-array'

Code cleanup.

* rs/realloc-array:
  use REALLOC_ARRAY for changing the allocation size of arrays
  add macro REALLOC_ARRAY
Merge branch 'jk/branch-verbose-merged'

The "--verbose" option no longer breaks "git branch --merged $it".

* jk/branch-verbose-merged:
  branch: clean up commit flags after merge-filter walk
Merge branch 'sb/help-unknown-command-sort-fix'

Code cleanup.

* sb/help-unknown-command-sort-fix:
  help: fix the size passed to qsort
Update draft release notes to 2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'hj/pretty-naked-decoration' into jch

The pretty-format specifier "%d", which expanded to " (tagname)"
for a tagged commit, gained a cousin "%D" that just gives the
"tagname" without frills.

* hj/pretty-naked-decoration:
  pretty: add %D format specifier

# Conflicts:
# 	log-tree.c
Merge branch 'da/rev-parse-verify-quiet' into jch

"rev-parse --verify --quiet $name" is meant to quietly exit with a
non-zero status when $name is not a valid object name, but still
gave error messages in some cases.

* da/rev-parse-verify-quiet:
  stash: prefer --quiet over shell redirection of the standard error stream
  refs: make rev-parse --quiet actually quiet
  t1503: use test_must_be_empty
  Documentation: a note about stdout for git rev-parse --verify --quiet
Merge branch 'rs/graph-simplify' into jch

* rs/graph-simplify:
  graph: simplify graph_padding_line()
Merge branch 'rs/remote-simplify' into jch

* rs/remote-simplify:
  remote: simplify match_name_with_pattern() using strbuf
Merge branch 'sb/t9300-typofix' into jch

* sb/t9300-typofix:
  t9300-fast-import: fix typo in test description
Merge branch 'sb/t6031-typofix' into jch

* sb/t6031-typofix:
  t6031-test-merge-recursive: do not forget to add file to be committed
Merge branch 'jk/mbox-from-line' into jch

Some MUAs mangled a line in a message that begins with "From " to
">From " when writing to a mailbox file and feeding such an input
to "git am" used to lose such a line.

* jk/mbox-from-line:
  mailinfo: work around -Wstring-plus-int warning
  mailinfo: make ">From" in-body header check more robust
Merge branch 'pr/use-default-sigpipe-setting' into jch

We used to get confused when a process called us with SIGPIPE
ignored; we do want to die with SIGPIPE when the output is not
read by default, and do ignore the signal when appropriate.

* pr/use-default-sigpipe-setting:
  mingw.h: add dummy functions for sigset_t operations
  unblock and unignore SIGPIPE