t7800: modernize tests

Eliminate a lot of redundant work by using test_config().
Catch more return codes by more use of temporary files
and test_cmp.

The original tests relied upon restore_test_defaults()
from the previous test to provide the next test with a sane
environment.  Make the tests do their own setup so that they
are not dependent on the success of the previous test.
The end result is shorter tests and better test isolation.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'as/check-ignore' into jch

"git check-ignore ." segfaulted, as a function it calls deep in its
callchain took a string in the <ptr, length> form but did not stop
when given an empty string.

Will merge to 'next' and will fast-track to 'master' (this is a new
feature in the upcoming release).

* as/check-ignore:
  name-hash: allow hashing an empty string
  t0008: document test_expect_success_multi
Merge branch 'ct/autoconf-htmldir' into jch

An earlier change to config.mak.autogen broke a build driven by the
./configure script when --htmldir is not specified on the command
line of ./configure.

Will merge to 'next' and will fast-track to 'master' (this is a
regressin workaround).

* ct/autoconf-htmldir:
  Bugfix: undefined htmldir in config.mak.autogen
Merge branch 'wk/man-deny-current-branch-is-default-these-days' into jch

Will merge to 'next' and fast-track to 'master'.

* wk/man-deny-current-branch-is-default-these-days:
  user-manual: typofix (ofthe->of the)
Merge branch 'ob/imap-send-ssl-verify' into jch

Correctly connect to SSL/TLS sites that serve multiple hostnames on
a single IP by including Server Name Indication in the client-hello.

* ob/imap-send-ssl-verify:
  imap-send: support SNI (RFC4366)
Merge branch 'jk/pkt-line-cleanup' into jch

Cleans up pkt-line API, implementation and its callers to make
them more robust.

* jk/pkt-line-cleanup:
  remote-curl: always parse incoming refs
  remote-curl: move ref-parsing code up in file
  remote-curl: pass buffer straight to get_remote_heads
  teach get_remote_heads to read from a memory buffer
  pkt-line: share buffer/descriptor reading implementation
  pkt-line: provide a LARGE_PACKET_MAX static buffer
  pkt-line: move LARGE_PACKET_MAX definition from sideband
  pkt-line: teach packet_read_line to chomp newlines
  pkt-line: provide a generic reading function with options
  pkt-line: drop safe_write function
  pkt-line: move a misplaced comment
  write_or_die: raise SIGPIPE when we get EPIPE
  upload-archive: use argv_array to store client arguments
  upload-archive: do not copy repo name
  send-pack: prefer prefixcmp over memcmp in receive_status
  fetch-pack: fix out-of-bounds buffer offset in get_ack
  upload-pack: remove packet debugging harness
  upload-pack: do not add duplicate objects to shallow list
  upload-pack: use get_sha1_hex to parse "shallow" lines

Conflicts:
	builtin/fetch-pack.c
Merge branch 'da/difftool-fixes' into jch

Minor maintenance updates to difftool, and updates to its tests.

Will merge to 'next'.

* da/difftool-fixes:
  t7800: modernize tests
  t7800: update copyright notice
  difftool: silence uninitialized variable warning
Merge branch 'jn/shell-disable-interactive' into pu

Expecting a reroll.
$gmane/216229

* jn/shell-disable-interactive:
  shell: pay attention to exit status from 'help' command
  shell doc: emphasize purpose and security model
Merge branch 'nd/branch-show-rebase-bisect-state' into pu

Expecting a reroll.
$gmane/215771

* nd/branch-show-rebase-bisect-state:
  branch: show rebase/bisect info when possible instead of "(no branch)"
Merge branch 'mb/gitweb-highlight-link-target' into pu

Expecting a reroll.
$gmane/211935

* mb/gitweb-highlight-link-target:
  Highlight the link target line in Gitweb using CSS
Merge branch 'mb/remote-default-nn-origin' into pu

When the user does not specify what remote to interact with, we
often attempt to use 'origin'.  This can now be customized via a
configuration variable.

Expecting a reroll.
$gmane/210151

"The first remote becomes the default" bit is better done as a
separate step.

* mb/remote-default-nn-origin:
  Teach get_default_remote to respect remote.default.
  Test that plain "git fetch" uses remote.default when on a detached HEAD.
  Teach clone to set remote.default.
  Teach "git remote" about remote.default.
  Teach remote.c about the remote.default configuration setting.
  Rename remote.c's default_remote_name static variables.

Conflicts:
	builtin/remote.c
	t/t5505-remote.sh
Merge branch 'jc/add-delete-default' into pu

"git add dir/" updated modified files and added new files, but does
not notice removed files, which may be "Huh?" to some users.  They
can of course use "git add -A dir/", but why should they?

Resurrected from graveyard, as I thought it was a worthwhile thing
to do in the longer term.

There seems to be some interest. Let's see if it results in a solid
execution of a sensible transition plan towards Git 2.0.

* jc/add-delete-default:
  git add: notice removal of tracked paths by default