index-format.txt: mention of v4 is missing in some places

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()

9d22778 (read-cache.c: write prefix-compressed names in the index -
2012-04-04) defined these. Interestingly, they were not used by
read-cache.c, or anywhere in that patch. They were used in
builtin/update-index.c later for checking supported index
versions. Use them here too.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-options: unconfuse description of --color

It said "by default it is off" while it also said "the default is
always", which confused everybody who read it only once.  It wanted
to say (1) if you do not say --color, it is not enabled, and (2) if
you say --color but do not say when to enable it, it will always be
enabled".

Rephrase to clarify by using "default" only once.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
update-index: list supported idx versions and their features

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/githooks: Explain pre-rebase parameters

Descriptions borrowed from templates/hooks--pre-rebase.sample.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
describe: Document --match pattern format

It's not clear in git-describe(1) what kind of "pattern" should be
passed to --match.  Fix that.

Signed-off-by: Greg Price <price@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h: Provide missing netdb.h definitions

Some platforms may lack the NI_MAXHOST and NI_MAXSERV values in their
system headers, so ensure they are available.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-filter-branch.txt: clarify ident variables usage

There is a rare edge case of git-filter-branch: a filter that unsets
identity variables from the environment. Link to git-commit-tree
clarifies how Git would fall back in this situation.

Signed-off-by: Tadeusz Andrzej Kadłubowski <yess@hell.org.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: filter-branch env-filter example

filter-branch --env-filter example that shows how to change the email
address in all commits before publishing a project.

Signed-off-by: Tadeusz Andrzej Kadłubowski <yess@hell.org.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Revert "graph.c: mark private file-scope symbols as static"

This reverts commit ba35480439d05b8f6cca50527072194fe3278bbb.

CGit uses these symbols to output the correct HTML around graph
elements.  Making these symbols private means that CGit cannot be
updated to use Git 1.8.0 or newer, so let's not do that.

On top of the revert, also add comments so that we avoid reintroducing
this problem in the future and suggest to those modifying this API
that they might want to discuss it with the CGit developers.

Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle: Fix "verify" output if history is complete

A more informative message for "complete" bundles was added in commit
8c3710fd3011 (tweak "bundle verify" of a complete history, 2012-06-04).

However, the prerequisites ref list is currently read *after* we
check if it equals zero, which means we never actually use the
number of prerequisite refs to decide when to print the newly
introduced message.  The code incorrectly uses the number of
references recorded in the bundle instead.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle: Add colons to list headings in "verify"

These slightly improve the reading flow by making it obvious that a list
follows.

Also, make the wording of both headings consistent by changing "contains
%d ref(s)" to "contains this ref"/"contains these %d refs".

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport.c: help gcc 4.6.3 users by squelching compiler warning

To a human reader, it is quite obvious that cmp is assigned before
it is used, but gcc 4.6.3 that ships with Ubuntu 12.04 is among
those that do not get this right.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/color-diff-doc' into maint-1.8.1

The "--color=<when>" argument to the commands in the diff family
was described poorly.

* jc/color-diff-doc:
  diff-options: unconfuse description of --color
Merge branch 'wk/doc-pre-rebase' into maint-1.8.1

The arguments given to pre-rebase hook were not documented.

* wk/doc-pre-rebase:
  Documentation/githooks: Explain pre-rebase parameters
Merge branch 'nd/doc-index-format' into maint-1.8.1

The v4 index format was not documented.

* nd/doc-index-format:
  update-index: list supported idx versions and their features
  read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()
  index-format.txt: mention of v4 is missing in some places
Merge branch 'gp/describe-match-uses-glob-pattern' into maint-1.8.1

The "--match=<pattern>" argument "git describe" takes uses glob
pattern but it wasn't obvious from the documentation.

* gp/describe-match-uses-glob-pattern:
  describe: Document --match pattern format
Merge branch 'dm/ni-maxhost-may-be-missing' into maint-1.8.1

Some sources failed to compile on systems that lack NI_MAXHOST in
their system header.

* dm/ni-maxhost-may-be-missing:
  git-compat-util.h: Provide missing netdb.h definitions
Merge branch 'tk/doc-filter-branch' into maint-1.8.1

Add an example use of "--env-filter" in "filter-branch"
documentation.

* tk/doc-filter-branch:
  Documentation: filter-branch env-filter example
  git-filter-branch.txt: clarify ident variables usage
Merge branch 'lf/bundle-verify-list-prereqs' into maint-1.8.1

"git bundle verify" did not say "records a complete history" for a
bundle that does not have any prerequisites.

* lf/bundle-verify-list-prereqs:
  bundle: Add colons to list headings in "verify"
  bundle: Fix "verify" output if history is complete