Fix some sparse warnings

Sparse issues some "Using plain integer as NULL pointer" warnings.
Each warning relates to the use of an '{0}' initialiser expression
in the declaration of an 'struct object_info'. The first field of
this structure has pointer type. Thus, in order to suppress these
warnings, we replace the initialiser expression with '{NULL}'.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-lib.sh - define and use GREP_STRIPS_CR

Define a common macro for grep needing -U to allow tests to not need
to inquire of specific platforms needing this option. Change
t3032 and t5560 to use this rather than testing explicitly for mingw.
This fixes these two tests on Cygwin.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Git.pm: revert _temp_cache use of temp_is_locked

When the temp_is_locked function was introduced, there was
a desire to make _temp_cache use it.  Unfortunately due to the
various tests and logic flow involved changing the _temp_cache
function to use the new temp_is_locked function is problematic
as _temp_cache needs a slightly different test than is provided
by the temp_is_locked function.

This change reverts use of temp_is_locked in the _temp_cache
function and restores the original code that existed there
before the temp_is_locked function was added.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add the LAST_ARG_MUST_BE_NULL macro

The sentinel function attribute is not understood by versions of
the gcc compiler prior to v4.0. At present, for earlier versions
of gcc, the build issues 108 warnings related to the unknown
attribute. In order to suppress the warnings, we conditionally
define the LAST_ARG_MUST_BE_NULL macro to provide the sentinel attribute
for gcc v4.0 and newer.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: "git reset <tree-ish> <pathspec>" takes a tree-ish, not tree-sh

Reported-By: Ibrahim M. Ghazal <imgx64@gmail.com>
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'tr/coverage' into maint

The test coverage framework was left broken for some time.

* tr/coverage:
  coverage: build coverage-untested-functions by default
  coverage: set DEFAULT_TEST_TARGET to avoid using prove
  coverage: do not delete .gcno files before building
  coverage: split build target into compile and test
Merge branch 'rs/discard-index-discard-array' into maint

* rs/discard-index-discard-array:
  read-cache: free cache in discard_index
  read-cache: add simple performance test
Merge branch 'rr/column-doc' into maint

* rr/column-doc:
  column doc: rewrite documentation for column.ui
Merge branch 'rs/tar-tests' into maint

* rs/tar-tests:
  t5000: test long filenames
  t5000: simplify tar-tree tests
  t5000: use check_tar for prefix test
  t5000: factor out check_tar
  t5000, t5003: create directories for extracted files lazily
  t5000: integrate export-subst tests into regular tests
Merge branch 'th/bisect-skip-report-range-fix' into maint

The bisect log listed incorrect commits when bisection ends with
only skipped ones.

* th/bisect-skip-report-range-fix:
  bisect: Fix log output for multi-parent skip ranges
Merge branch 'sb/archive-zip-double-assignment-fix' into maint

* sb/archive-zip-double-assignment-fix:
  archive-zip:write_zip_entry: Remove second reset of size variable to zero.
Merge branch 'tr/test-commit-only-on-orphan' into maint

* tr/test-commit-only-on-orphan:
  Test 'commit --only' after 'checkout --orphan'
Merge branch 'jk/apache-test-for-2.4' into maint

Allow our tests to run with newer Apache.

* jk/apache-test-for-2.4:
  lib-httpd/apache.conf: check version only after mod_version loads
  t/lib-httpd/apache.conf: configure an MPM module for apache 2.4
  t/lib-httpd/apache.conf: load compat access module in apache 2.4
  t/lib-httpd/apache.conf: load extra auth modules in apache 2.4
  t/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4
Merge branch 'js/test-ln-s-add' into maint

* js/test-ln-s-add:
  t4011: remove SYMLINKS prerequisite
  t6035: use test_ln_s_add to remove SYMLINKS prerequisite
  t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
  t3100: use test_ln_s_add to remove SYMLINKS prerequisite
  t3030: use test_ln_s_add to remove SYMLINKS prerequisite
  t0000: use test_ln_s_add to remove SYMLINKS prerequisite
  tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
  tests: introduce test_ln_s_add
  t3010: modernize style
  test-chmtime: Fix exit code on Windows
Merge branch 'rs/logical-vs-binary-or' into maint

* rs/logical-vs-binary-or:
  use logical OR (||) instead of binary OR (|) in logical context
Merge branch 'mm/push-force-is-dangerous' into maint

* mm/push-force-is-dangerous:
  Documentation/git-push.txt: explain better cases where --force is dangerous
Merge branch 'ys/cygstart' into maint

* ys/cygstart:
  web--browse: support /usr/bin/cygstart on Cygwin
Merge branch 'wk/doc-git-has-grown' into maint

* wk/doc-git-has-grown:
  user-manual: Update download size for Git and the kernel
Merge branch 'vl/typofix' into maint

* vl/typofix:
  random typofixes (committed missing a 't', successful missing an 's')
Merge branch 'jc/t1512-fix' into maint

* jc/t1512-fix:
  get_short_sha1(): correctly disambiguate type-limited abbreviation
  t1512: correct leftover constants from earlier edition