tests: drop GIT_*_TIMING_TESTS environment variable support

Two tests (t3302 and t3419) used to have their own environment
variable to trigger expensive tests without enabling expensive
tests in other scripts; a user could set GIT_NOTES_TIMING_TESTS
but not GIT_TEST_LONG and run the whole test suite and trigger
expensive tests only in t3302 but not other tests.  The same for
GIT_PATCHID_TIMING_TESTS in t3419.

While this may have seemed a good flexibility, in reality if you are
concentrating on a single test (e.g. t3302), you can just run that
single test with the GIT_TEST_LONG to trigger expensive tests.  It
does not seem worth forcing other people who may want to come up
with their own expensive tests to invent new environment variables
by keeping this convention.

Drop them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
receive-pack::hmac_sha1(): copy the entire SHA-1 hash out

clang gives the following warning:

builtin/receive-pack.c:327:35: error: sizeof on array function
parameter will return size of 'unsigned char *' instead of 'unsigned
char [20]' [-Werror,-Wsizeof-array-argument]
        git_SHA1_Update(&ctx, out, sizeof(out));
                                         ^
builtin/receive-pack.c:292:37: note: declared here
static void hmac_sha1(unsigned char out[20],
                                   ^
Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_to_hex: split out "hex-format n bytes" helper and use it

The original sha1_to_hex() becomes the only one caller of
bin_to_hex() helper; no functional or performance change intended.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
receive-pack: truncate hmac early and convert only necessary bytes

Instead of copying out 20-bytes of HMAC, format it into 40-bytes of
hex and then chomping it to 20-bytes output when generating a nonce,
copy out only HMAC_TRUNCATE (=10) bytes, convert it to text using
the new bin_to_hex() helper to do the same.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
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
Merge branch 'sb/merge-recursive-copy-paste-fix' into jch

"git merge-recursive" had a small bug that could have made it
mishandle "one side deleted, the other side did not touch it" in a
rare corner case, where the other side actually did touch to cause
the blob object names to be different but both blobs before and
after the change normalize to the same (e.g. correcting mistake to
check in a blob with CRLF line endings by replacing it with another
blob that records the same contents with LF line endings).

* sb/merge-recursive-copy-paste-fix:
  merge-recursive: remove stale commented debugging code
  merge-recursive: fix copy-paste mistake
Merge branch 'jc/push-cert' into jch

Allow "git push" request to be signed, so that it can be verified and
audited, using the GPG signature of the person who pushed, that the
tips of branches at a public repository really point the commits
the pusher wanted to, without having to "trust" the server.

* jc/push-cert: (24 commits)
  receive-pack::hmac_sha1(): copy the entire SHA-1 hash out
  signed push: allow stale nonce in stateless mode
  signed push: teach smart-HTTP to pass "git push --signed" around
  signed push: fortify against replay attacks
  signed push: add "pushee" header to push certificate
  signed push: remove duplicated protocol info
  send-pack: send feature request on push-cert packet
  receive-pack: GPG-validate push certificates
  push: the beginning of "git push --signed"
  pack-protocol doc: typofix for PKT-LINE
  gpg-interface: move parse_signature() to where it should be
  gpg-interface: move parse_gpg_output() to where it should be
  send-pack: clarify that cmds_sent is a boolean
  send-pack: refactor inspecting and resetting status and sending commands
  send-pack: rename "new_refs" to "need_pack_data"
  receive-pack: factor out capability string generation
  send-pack: factor out capability string generation
  send-pack: always send capabilities
  send-pack: refactor decision to send update per ref
  send-pack: move REF_STATUS_REJECT_NODELETE logic a bit higher
  ...
Merge branch 'jt/itimer-autoconf' into jch

Split the early part of jt/timer-settime topic out into a topic.

* jt/itimer-autoconf:
  autoconf: check for setitimer()
  autoconf: check for struct itimerval
  git-compat-util.h: add missing semicolon after struct itimerval
Merge branch 'nd/archive-pathspec' into jch

"git archive" learned to filter what gets archived with pathspec.

* nd/archive-pathspec:
  archive: support filtering paths with glob
Merge branch 'jc/test-lazy-prereq' into jch

Test-script clean-up.

* jc/test-lazy-prereq:
  tests: drop GIT_*_TIMING_TESTS environment variable support
### match next
Merge branch 'sp/stream-clean-filter' into jch

* sp/stream-clean-filter:
  sha1_file: don't convert off_t to size_t too early to avoid potential die()
  convert: stream from fd to required clean filter to reduce used address space
  copy_fd(): do not close the input file descriptor
  mmap_limit: introduce GIT_MMAP_LIMIT to allow testing expected mmap size
  memory_limit: use git_env_ulong() to parse GIT_ALLOC_LIMIT
  config.c: add git_env_ulong() to parse environment variable
  convert: drop arguments other than 'path' from would_convert_to_git()

# Conflicts:
# 	wrapper.c
Merge branch 'tr/remerge-diff' into jch

"log -p" output learns a new way to let users inspect a merge
commit by showing the differences between the automerged result
with conflicts the person who recorded the merge would have seen
and the final conflict resolution that was recorded in the merge.

* tr/remerge-diff:
  log --remerge-diff: show what the conflict resolution changed
  name-hash: allow dir hashing even when !ignore_case
  merge-recursive: allow storing conflict hunks in index
  merge_diff_mode: fold all merge diff variants into an enum
  combine-diff: do not pass revs->dense_combined_merges redundantly
  merge-recursive: -Xindex-only to leave worktree unchanged
  merge-recursive: internal flag to avoid touching the worktree
  merge-recursive: remove dead conditional in update_stages()

# Conflicts:
# 	merge-recursive.c
Merge branch 'da/include-compat-util-first-in-c' into jch

* da/include-compat-util-first-in-c:
  SQUASH???
  check-headers: add header usage checks for .c files
  Makefile: add check-headers target
  cleanups: ensure that git-compat-util.h is included first
Merge branch 'so/rebase-doc-fork-point' into jch

* so/rebase-doc-fork-point:
  Documentation/git-rebase.txt: document when --fork-point is auto-enabled
Merge branch 'sk/tag-contains-wo-recursion' into jch

* sk/tag-contains-wo-recursion:
  t7004: give the test a bit more stack space
Merge branch 'jc/push-cert-hmac-optim' into jch

* jc/push-cert-hmac-optim:
  receive-pack: truncate hmac early and convert only necessary bytes
  sha1_to_hex: split out "hex-format n bytes" helper and use it