cleanups: ensure that git-compat-util.h is included first

CodingGuidelines states that the first #include in C files should be
git-compat-util.h or another header file that includes it, such as
cache.h or builtin.h.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rebase.txt: document when --fork-point is auto-enabled

Running "git rebase" without giving a specific commit with respect
to which the operation is done enables --fork-point mode, while
telling the command to rebase with respect to a specific commit,
i.e. "git rebase <upstream>" does not.

This was not mentioned in the DESCRIPTION section of the manual
page, even though the case of omitted <upstream> was otherwise
discussed.  That in turn made actual behavior of vanilla "git
rebase" hardly discoverable.

While we are at it, clarify the --fork-point description itself as
well.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t0090: avoid passing empty string to printf %d

FreeBSD's printf(1) doesn't accept empty strings for numerical format
specifiers:

	$ printf "%d\n" "" >/dev/null; echo $?
	printf: : expected numeric value
	1

Initialize the AWK variable c to make sure the shell variable
subtree_count always contains a numerical value, in order to keep the
subsequently called printf happy.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon: handle gethostbyname() error

If the user-supplied hostname can't be found then we should not use it.
We already avoid doing that in the non-NO_IPV6 case by checking if the
return value of getaddrinfo() is zero (success).  Do the same in the
NO_IPV6 case and make sure the return value of gethostbyname() isn't
NULL before dereferencing this pointer.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon: fix error message after bind()

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon: remove write-only variable maxfd

It became unused when 6573faff (NO_IPV6 support for git daemon) replaced
select() with poll().

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-tag.txt: Add a missing hyphen to `-s`

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
completion: add --show-signature for log and show

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/mbox-from-line' into maint

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 'maint-1.8.5' into maint-1.9

* maint-1.8.5:
  git-tag.txt: Add a missing hyphen to `-s`
Merge branch 'maint-1.9' into maint-2.0

* maint-1.9:
  git-tag.txt: Add a missing hyphen to `-s`
Merge branch 'maint-2.0' into maint

* maint-2.0:
  git-tag.txt: Add a missing hyphen to `-s`
Sync with maint

* maint:
  git-tag.txt: Add a missing hyphen to `-s`
Merge branch 'da/include-compat-util-first-in-c' into next

Code clean-up.

* da/include-compat-util-first-in-c:
  cleanups: ensure that git-compat-util.h is included first
Merge branch 'so/rebase-doc-fork-point' into next

* so/rebase-doc-fork-point:
  Documentation/git-rebase.txt: document when --fork-point is auto-enabled
Merge branch 'dt/cache-tree-repair' into next

This fixes a topic that has graduated to 'master'.

* dt/cache-tree-repair:
  t0090: avoid passing empty string to printf %d
Merge branch 'rs/daemon-fixes' into next

"git daemon" (with NO_IPV6 build configuration) used to incorrectly
use the hostname even when gethostbyname() reported that the given
hostname is not found.

* rs/daemon-fixes:
  daemon: remove write-only variable maxfd
  daemon: fix error message after bind()
  daemon: handle gethostbyname() error
Merge branch 'da/completion-show-signature' into next

* da/completion-show-signature:
  completion: add --show-signature for log and show
Sync with master

* master:
  git-tag.txt: Add a missing hyphen to `-s`
gpg-interface: provide clear helper for struct signature_check

The struct has been growing members whose malloced memory needs to be
freed. Do this with one helper function so that no malloced memory shall
be left unfreed.