git p4 test: check for error message in failed test

Make sure the test fails for the expected reason.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: copy source indeterminate

Msysgit testing showed that the source file found by copy
detection is indeterminate when there are multiple sources
to choose from.  This appears to be valid.  Adjust the test
so that it passes if it finds any of the potential copy sources.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: cleanup_git should make a new $git

For convenience, leave one in place at the end of each
test so that it is not necessary to build a new one.  This
makes it consistent with $cli.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: split up big t9800 test

The original t9800 test code has a mix of assorted topics, some
of which are big enough to deserve their own homes.
Interdependencies between the topics make it confusing when
trying to study one in isolation.  And it takes so long to run
that debugging an individual test is difficult.

Split out three big chunks of tests into their own files:

    t9812-git-p4-wildcards.sh gets the 8 p4 wildcard tests

    t9813-git-p4-preserve-users.sh gets the 4 --preserve-user tests

    t9814-git-p4-rename.sh gets the 2 copy and rename tests

Test 9800 execution time drops from 29 sec to 9 sec.  The
sequential time to run all tests is a slower due to the three
extra p4d startup/shutdown sequences, but the overall parallel
execution time is about the same, at 52 sec.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git p4 test: fix badp4dir test

The construct used to get the return code was flawed, in that
errors in the &&-chain before the semicolon were not caught.  Use
the standard test_expect_code instead.

Set PATH in a subshell instead of relying on the bashism of
setting it just for a single command.

And fix the grep line so it doesn't worry about grep segfaults,
and doesn't fail for i18n issues.

Reported-by: Johannes Sixt <j.sixt@viscovery.net>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add config variable to set HTML path for git-help --web

If set in git-config, help.htmlpath overrides system_path(GIT_HTML_PATH)
which was compiled in. This allows users to repoint system-wide git at
their own copy of the documentation without recompiling.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Allow help.htmlpath to be a URL prefix

Setting this to a URL prefix instead of a path to a local directory allows
git-help --web to work even when HTML docs aren't locally installed, by
pointing the browser at a copy accessible on the web. For example,

    [help]
      format = html
      htmlpath = http://git-scm.com/docs

will use the publicly available documentation on the git homepage.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/diff-no-index-pager'

"git diff --no-index" did not work with pagers correctly.
Merge branch 'mm/verify-filename-fix'

"git diff COPYING HEAD:COPYING" gave a nonsense error message that
claimed that the treeish HEAD did not have COPYING in it.
Merge branch 'nd/stream-index-pack'

Use streaming API to read from the object store to avoid having to hold
a large blob object in-core while running index-pack.
Merge branch 'nd/stream-pack-objects'

"pack-objects" learned to read large loose blobs using the streaming API,
without the need to hold everything in core at once.
Merge branch 'nd/exclude-workaround-top-heavy'

Attempt to optimize matching with an exclude pattern with a deep
directory hierarchy by taking the part that specifies leading path
without wildcard literally.
Merge branch 'hv/submodule-update-nuke-submodules'

"git add" allows adding a regular file to the path where a submodule
used to exist, but "git update-index" does not allow an equivalent
operation to Porcelain writers.
Merge branch 'jc/rev-list-simplify-merges-first-parent'

When "--simplify-merges/by-decoration" is given together with
"--first-parent" to "git log", the combination of these options
makes the simplification logic to use in-core commit objects that
haven't been examined for relevance, either producing incorrect
result or taking too long to produce any output.  Teach the
simplification logic to ignore commits that the first-parent
traversal logic ignored when both are in effect to work around the
issue.
Merge branch 'lk/rebase-i-x'

Teach "-x <cmd>" to "rebase -i" to insert "exec <cmd>" after each
commit in the resulting history.
Merge branch 'lk/more-helpful-status-hints'

Give finer classification to various states of paths in conflicted
state and offer advice messages in the "git status" output.
Merge branch 'js/submodule-relative'

Teach "git submodule" deal with nested submodule structure where a
module is contained within a module whose origin is specified as a
relative URL to its superproject's origin.
Merge branch 'fc/git-prompt-script'

Split a rather heavy-ish "git completion" script out to create a
separate "git prompting" script, to help lazy-autoloading of the
completion part while making prompting part always available.
Third batch for 1.7.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-index.c: do not pretend paths are pathspecs

"git diff --no-index" takes exactly two paths, not pathspecs, and
has its own way queue_diff() to populate the diff_queue.  Do not
call diff_tree_setup_paths(), pretending as it takes pathspecs.

Signed-off-by: Junio C Hamano <gitster@pobox.com>