config: arbitrary number of matches for --unset and --replace-all

git-config used a static match array to hold the matches we want to
unset/replace when using --unset or --replace-all.  Use a
variable-sized array instead.

This in particular fixes the symptoms git-svn had when storing large
numbers of svn-remote.*.added-placeholder entries in the config file.

While the tests are rather more paranoid than just --unset and
--replace-all, the other operations already worked.  Indeed git-svn's
usage only breaks the first time *after* creating so many entries,
when it wants to unset and re-add them all.

Reported-by: Jess Hottenstein <jess.hottenstein@gmail.com>
Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.txt: fix mark-up

Some the labeled list entries have a blank line between the label
and the body text, and some don't.  Use the latter style for
consistency; incidentally, syntax highlighting in Vim works better
if there is no blank line there.

Typeset literal options, commands, and path names in monospace.
When using `literal string` mark-up to do so, there is no need to
escape AsciiDoc special characters with backslashes, so make sure we
don't do so.

Replace some double quotes with proper AsciiDoc quotes
(e.g. ``foo'').

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.txt: fix some grammatical issues and typos

Various fixes:

 - fix typos (e.g. "show" -> "shown")
 - use "regular expression(s)" instead of "regexp" where appropriate
 - reword some sentences for easier reading
 - fix/improve some grammatical issues (e.g. comma usage)
 - add missing articles (e.g. "the")
 - change "E-mail" to "email"

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-hg: don't decode UTF-8 paths into Unicode objects

The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-lib.sh: convert $TEST_DIRECTORY to an absolute path

If $TEST_DIRECTORY is specified in the environment, convert the value
to an absolute path to ensure that it remains valid even when 'cd' is
used.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Reviewed-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-bzr.sh, test-hg.sh: allow running from any dir

Set TEST_DIRECTORY to the t/ directory (if TEST_DIRECTORY is not
already set) so that the user doesn't already have to be in the test
directory to run these test scripts.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Based-on-patch-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-bzr.sh, test-hg.sh: prepare for change to push.default=simple

Change 'git push <remote>' to 'git push <remote> <branch>' in one of
the test-bzr.sh tests to ensure that the test continues to pass when
the default value of push.default changes to simple.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-hg.sh: eliminate 'local' bashism

Unlike bash, POSIX shell does not specify a 'local' command for
declaring function-local variable scope.  Except for IFS, the variable
names are not used anywhere else in the script so simply remove the
'local'.  For IFS, move the assignment to the 'read' command to
prevent it from affecting code outside the function.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-hg.sh: avoid obsolete 'test' syntax

The POSIX spec says that the '-a', '-o', and parentheses operands to
the 'test' utility are obsolete extensions due to the potential for
ambiguity.  Replace '-o' with '|| test' to avoid unspecified behavior.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-hg.sh: fix duplicate content strings in author tests

"beta" was used twice.  Change the second copy to "gamma" and
increment the remaining content strings.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test-hg.sh: help user correlate verbose output with email test

It's hard to tell which author conversion test failed when the email
addresses look similar.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-bzr, remote-hg: fix email address regular expression

Before, strings like "foo.bar@example.com" would be converted to
"foo. <bar@example.com>" when they should be "unknown
<foo.bar@example.com>".

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile: rebuild perl scripts when perl paths change

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile: add PERLLIB_EXTRA variable that adds to default perl path

Some platforms ship Perl modules used by git scripts outside the
default perl path (e.g., on Mac OS X, Subversion's perl bindings live
in a separate xcode perl path).  Add an PERLLIB_EXTRA variable to hold
a colon-separated list of extra directories to add to the perl path in
git's scripts, as a convenience for packagers.

Requested-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
RelNotes: spelling & grammar fixes

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'mb/relnotes-1.8.5-fix'

* mb/relnotes-1.8.5-fix:
  RelNotes: spelling & grammar fixes
Merge branch 'tr/config-multivalue-lift-max' into next

* tr/config-multivalue-lift-max:
  config: arbitrary number of matches for --unset and --replace-all
Merge branch 'rh/remote-hg-bzr-updates' into next

* rh/remote-hg-bzr-updates:
  remote-bzr, remote-hg: fix email address regular expression
  test-hg.sh: help user correlate verbose output with email test
  test-hg.sh: fix duplicate content strings in author tests
  test-hg.sh: avoid obsolete 'test' syntax
  test-hg.sh: eliminate 'local' bashism
  test-bzr.sh, test-hg.sh: prepare for change to push.default=simple
  test-bzr.sh, test-hg.sh: allow running from any dir
  test-lib.sh: convert $TEST_DIRECTORY to an absolute path
  remote-hg: don't decode UTF-8 paths into Unicode objects
Merge branch 'jj/rev-list-options-doc' into next

Mark-up and grammo fixes.

* jj/rev-list-options-doc:
  Documentation/rev-list-options.txt: fix some grammatical issues and typos
  Documentation/rev-list-options.txt: fix mark-up
Merge branch 'jn/perl-lib-extra' into next

* jn/perl-lib-extra:
  Makefile: add PERLLIB_EXTRA variable that adds to default perl path
  Makefile: rebuild perl scripts when perl paths change