gitweb.git
Documentation/git-gc.txt: add reference to githooksChris Packham Wed, 30 Jun 2010 20:41:27 +0000 (13:41 -0700)

Documentation/git-gc.txt: add reference to githooks

This advertises the existence of the 'pre-auto-gc' hook and adds a cross
reference to where the hook is documented.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Updates from the list to 1.7.2 Release NotesJunio C Hamano Fri, 2 Jul 2010 17:29:07 +0000 (10:29 -0700)

Updates from the list to 1.7.2 Release Notes

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

Git 1.7.2-rc1 v1.7.2-rc1Junio C Hamano Wed, 30 Jun 2010 19:22:13 +0000 (12:22 -0700)

Git 1.7.2-rc1

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

git.spec.in: Add gitweb subpackageJunio C Hamano Wed, 30 Jun 2010 22:49:07 +0000 (15:49 -0700)

git.spec.in: Add gitweb subpackage

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

Merge branch 'ar/decorate-color'Junio C Hamano Wed, 30 Jun 2010 18:55:40 +0000 (11:55 -0700)

Merge branch 'ar/decorate-color'

* ar/decorate-color:
Add test for correct coloring of git log --decoration
Allow customizable commit decorations colors
log --decorate: Colorize commit decorations
log-tree.c: Use struct name_decoration's type for classifying decoration
commit.h: add 'type' to struct name_decoration

Merge branch 'mg/doc-rev-parse-treepath-syntax'Junio C Hamano Wed, 30 Jun 2010 18:55:40 +0000 (11:55 -0700)

Merge branch 'mg/doc-rev-parse-treepath-syntax'

* mg/doc-rev-parse-treepath-syntax:
git-rev-parse.txt: Add more examples for caret and colon
git-rev-parse.txt: Document ":path" specifier

Merge branch 'cc/cherry-pick-stdin'Junio C Hamano Wed, 30 Jun 2010 18:55:39 +0000 (11:55 -0700)

Merge branch 'cc/cherry-pick-stdin'

* cc/cherry-pick-stdin:
revert: do not rebuild argv on heap
revert: accept arbitrary rev-list options
t3508 (cherry-pick): futureproof against unmerged files

Merge branch 'jl/status-ignore-submodules'Junio C Hamano Wed, 30 Jun 2010 18:55:39 +0000 (11:55 -0700)

Merge branch 'jl/status-ignore-submodules'

* jl/status-ignore-submodules:
Add the option "--ignore-submodules" to "git status"
git submodule: ignore dirty submodules for summary and status

Conflicts:
builtin/commit.c
t/t7508-status.sh
wt-status.c
wt-status.h

Merge branch 'jk/url-decode'Junio C Hamano Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)

Merge branch 'jk/url-decode'

* jk/url-decode:
url_decode: URL scheme ends with a colon and does not require a slash

Merge branch 'jn/grep-open'Junio C Hamano Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)

Merge branch 'jn/grep-open'

* jn/grep-open:
t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script
t/t7811-grep-open.sh: ensure fake "less" is made executable
t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression
grep -O: allow optional argument specifying the pager (or editor)
grep: Add the option '--open-files-in-pager'
Unify code paths of threaded greps
grep: refactor grep_objects loop into its own function

Conflicts:
t/t7006-pager.sh

Merge branch 'jp/string-list-api-cleanup'Junio C Hamano Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)

Merge branch 'jp/string-list-api-cleanup'

* jp/string-list-api-cleanup:
string_list: Fix argument order for string_list_append
string_list: Fix argument order for string_list_lookup
string_list: Fix argument order for string_list_insert_at_index
string_list: Fix argument order for string_list_insert
string_list: Fix argument order for for_each_string_list
string_list: Fix argument order for print_string_list

Merge branch 'tr/rev-list-count'Junio C Hamano Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)

Merge branch 'tr/rev-list-count'

* tr/rev-list-count:
bash completion: Support "divergence from upstream" messages in __git_ps1
rev-list: introduce --count option

Conflicts:
contrib/completion/git-completion.bash

Merge branch 'as/maint-completion-set-u-fix'Junio C Hamano Wed, 30 Jun 2010 18:55:37 +0000 (11:55 -0700)

Merge branch 'as/maint-completion-set-u-fix'

* as/maint-completion-set-u-fix:
bash-completion: Fix __git_ps1 to work with "set -u"

Merge branch 'mg/rev-parse-tests'Junio C Hamano Wed, 30 Jun 2010 18:55:37 +0000 (11:55 -0700)

Merge branch 'mg/rev-parse-tests'

* mg/rev-parse-tests:
t6018: make sure all tested symbolic names are different revs
t6018: add tests for rev-list's --branches and --tags

Merge branch 'jl/maint-diff-ignore-submodules'Junio C Hamano Wed, 30 Jun 2010 18:55:37 +0000 (11:55 -0700)

Merge branch 'jl/maint-diff-ignore-submodules'

* jl/maint-diff-ignore-submodules:
t4027,4041: Use test -s to test for an empty file
Add optional parameters to the diff option "--ignore-submodules"
git diff: rename test that had a conflicting name

Add test for correct coloring of git log --decorationNazri Ramliy Tue, 29 Jun 2010 07:47:08 +0000 (15:47 +0800)

Add test for correct coloring of git log --decoration

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.7.1.1Junio C Hamano Tue, 29 Jun 2010 18:24:36 +0000 (11:24 -0700)

Sync with 1.7.1.1

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

revert: do not rebuild argv on heapJonathan Nieder Mon, 14 Jun 2010 05:32:09 +0000 (00:32 -0500)

revert: do not rebuild argv on heap

Set options in struct rev_info directly so we can reuse the
arguments collected from parse_options without modification.

This is just a cleanup; no noticeable change is intended.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge commit 'v1.7.2-rc0~6^2' into cc/cherry-pick-stdinJunio C Hamano Tue, 29 Jun 2010 17:20:53 +0000 (10:20 -0700)

Merge commit 'v1.7.2-rc0~6^2' into cc/cherry-pick-stdin

* commit 'v1.7.2-rc0~6^2':
DWIM 'git show -5' to 'git show --do-walk -5'
Documentation/SubmittingPatches: Fix typo in GMail section
Documentation/config: describe status.submodulesummary

This commit fixes one test in t3508 by making "cherry-pick -<num>"
walk the history.

A test update from Elijah Newren is squashed as an evil merge.

Git 1.7.1.1 v1.7.1.1Junio C Hamano Tue, 29 Jun 2010 16:59:56 +0000 (09:59 -0700)

Git 1.7.1.1

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

t/t9700/test.pl: don't access private object members... Brandon Casey Mon, 28 Jun 2010 22:51:02 +0000 (17:51 -0500)

t/t9700/test.pl: don't access private object members, use public access methods

This test is accessing private object members of the Test::More and
Test::Builder objects. Older versions of Test::More did not implement
these variables using a hash.

My system complains as follows:

Can't coerce array into hash at <snip>/t/t9700/test.pl line 13.
BEGIN failed--compilation aborted at <snip>/t/t9700/test.pl line 15.

There are public access methods available for retrieving and setting these
variables, so let's use them instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t9001: use egrep when regular expressions are involvedBrandon Casey Mon, 28 Jun 2010 22:46:22 +0000 (17:46 -0500)

t/t9001: use egrep when regular expressions are involved

Supplying backslashed, extended regular expressions to grep is not
portable. Use egrep instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-rev-parse.txt: Add more examples for caret and... Michael J Gruber Mon, 28 Jun 2010 19:01:07 +0000 (21:01 +0200)

git-rev-parse.txt: Add more examples for caret and colon

Several items in the caret, colon and friends section contain examples
already. Make sure they all come with examples, and that examples come
early so that they serve as a visual guide, as well.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 29 Jun 2010 00:42:26 +0000 (17:42 -0700)

Merge branch 'maint'

* maint:
Update draft release notes to 1.7.1.1
notes: Initialise variable to appease gcc
notes: check number of parameters to "git notes copy"

Update draft release notes to 1.7.1.1Junio C Hamano Tue, 29 Jun 2010 00:42:18 +0000 (17:42 -0700)

Update draft release notes to 1.7.1.1

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

Merge branch 'tr/send-email-8bit' into maintJunio C Hamano Mon, 28 Jun 2010 23:19:03 +0000 (16:19 -0700)

Merge branch 'tr/send-email-8bit' into maint

* tr/send-email-8bit:
send-email: ask about and declare 8bit mails

Merge branch 'pb/maint-perl-errmsg-no-dir' into maintJunio C Hamano Mon, 28 Jun 2010 23:18:58 +0000 (16:18 -0700)

Merge branch 'pb/maint-perl-errmsg-no-dir' into maint

* pb/maint-perl-errmsg-no-dir:
Git.pm: better error message

Merge branch 'js/maint-am-rebase-invalid-author' into... Junio C Hamano Mon, 28 Jun 2010 23:18:43 +0000 (16:18 -0700)

Merge branch 'js/maint-am-rebase-invalid-author' into maint

* js/maint-am-rebase-invalid-author:
am: use get_author_ident_from_commit instead of mailinfo when rebasing

Merge branch 'jc/maint-simpler-common-prefix' into... Junio C Hamano Mon, 28 Jun 2010 23:18:15 +0000 (16:18 -0700)

Merge branch 'jc/maint-simpler-common-prefix' into maint

* jc/maint-simpler-common-prefix:
common_prefix: simplify and fix scanning for prefixes

Merge branch 'bd/maint-unpack-trees-parawalk-fix' into... Junio C Hamano Mon, 28 Jun 2010 23:18:02 +0000 (16:18 -0700)

Merge branch 'bd/maint-unpack-trees-parawalk-fix' into maint

* bd/maint-unpack-trees-parawalk-fix:
unpack-trees: Make index lookahead less pessimal

git --paginate: do not commit pager choice too earlyNguyễn Thái Ngọc Duy Sat, 26 Jun 2010 19:26:37 +0000 (14:26 -0500)

git --paginate: do not commit pager choice too early

When git is passed the --paginate option, starting up a pager requires
deciding what pager to start, which requires access to the core.pager
configuration.

At the relevant moment, the repository has not been searched for yet.
Attempting to access the configuration at this point results in
git_dir being set to .git [*], which is almost certainly not what was
wanted. In particular, when run from a subdirectory of the toplevel,
git --paginate does not respect the core.pager setting from the
current repository.

[*] unless GIT_DIR or GIT_CONFIG is set

So delay the pager startup when possible:

1. run_argv() already commits pager choice inside run_builtin() if a
command is found. For commands that use RUN_SETUP, waiting until
then fixes the problem described above: once git knows where to
look, it happily respects the core.pager setting.

2. list_common_cmds_help() prints out 29 lines and exits. This can
benefit from pagination, so we need to commit the pager choice
before writing this output.

Luckily ‘git’ without subcommand has no other reason to access a
repository, so it would be intuitive to ignore repository-local
configuration in this case. Simpler for now to choose a pager
using the funny code that notices a repository that happens to be
at .git. That this accesses a repository when it is very
convenient to is a bug but not an important one.

3. help_unknown_cmd() prints out a few lines to stderr. It is not
important to paginate this, so don’t.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: local config file should be honored from subdirs... Jonathan Nieder Sat, 26 Jun 2010 19:25:37 +0000 (14:25 -0500)

tests: local config file should be honored from subdirs of toplevel

When git is passed the --paginate option, starting up a pager requires
deciding what pager to start, which requires access to the core.pager
configuration. If --paginate is handled before searching for the
git dir, this configuration will be missed.

In other words, with --paginate and only with --paginate, any
repository-local core.pager setting is being ignored [*].

[*] unless the git directory is ./.git or GIT_DIR or GIT_CONFIG was
set explicitly.

Add a test to demonstrate this counterintuitive behavior. Noticed
while reading over a patch by Duy that fixes it.

Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Improved-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7006: test pager configuration for several git commandsJonathan Nieder Sat, 26 Jun 2010 19:24:50 +0000 (14:24 -0500)

t7006: test pager configuration for several git commands

Test choice of pager at several stages of repository setup. This
provides some (admittedly uninteresting) examples to keep in mind when
considering changes to the setup procedure.

Improved-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7006 (pager): introduce helper for parameterized testsJonathan Nieder Sat, 26 Jun 2010 19:23:02 +0000 (14:23 -0500)

t7006 (pager): introduce helper for parameterized tests

The current tests test pager configuration for ‘git log’, but other
commands use a different setup procedure and should therefore be
tested separately. Add a helper to make this easier.

This patch introduces the helper and changes some existing tests to
use it. The only functional change should be the introduction of ‘git
log - ’ to a few test descriptions.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes: Initialise variable to appease gccRamsay Jones Mon, 21 Jun 2010 18:52:29 +0000 (19:52 +0100)

notes: Initialise variable to appease gcc

gcc version 3.4.4 thinks that the 'cmp' variable could be used
while uninitialised and complains thus:

notes.c: In function `write_each_non_note_until':
notes.c:719: warning: 'cmp' might be used uninitialized in \
this function

Note that gcc versions 4.1.2 and 4.4.0 do not issue this warning.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes: check number of parameters to "git notes copy"Jeff King Mon, 28 Jun 2010 08:59:07 +0000 (04:59 -0400)

notes: check number of parameters to "git notes copy"

Otherwise we may segfault with too few parameters.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

msvc: Select the "fast" definition of the {get,put... Ramsay Jones Wed, 23 Jun 2010 19:47:02 +0000 (20:47 +0100)

msvc: Select the "fast" definition of the {get,put}_be32() macros

On Intel machines, the msvc compiler defines the CPU architecture
macros _M_IX86 and _M_X64 (equivalent to __i386__ and __x86_64__
respectively). Use these macros in the pre-processor expression
to select the "fast" definition of the {get,put}_be32() macros.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-rev-parse.txt: Document ":path" specifierMichael J Gruber Sun, 27 Jun 2010 13:15:22 +0000 (15:15 +0200)

git-rev-parse.txt: Document ":path" specifier

The empty treeish in ":path" means "index". This is actually a special
case of the ":stage:path" syntax where it is documented, but mentioning
it also together with "treeish:path" is helpful, so do it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.2-rc0 v1.7.2-rc0Junio C Hamano Sun, 27 Jun 2010 19:01:12 +0000 (12:01 -0700)

Git 1.7.2-rc0

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

Merge branch 'cp/textconv-cat-file'Junio C Hamano Sun, 27 Jun 2010 19:07:55 +0000 (12:07 -0700)

Merge branch 'cp/textconv-cat-file'

* cp/textconv-cat-file:
git-cat-file.txt: Document --textconv
t/t8007: test textconv support for cat-file
textconv: support for cat_file
sha1_name: add get_sha1_with_context()

Merge branch 'pb/maint-perl-errmsg-no-dir'Junio C Hamano Sun, 27 Jun 2010 19:07:45 +0000 (12:07 -0700)

Merge branch 'pb/maint-perl-errmsg-no-dir'

* pb/maint-perl-errmsg-no-dir:
Git.pm: better error message

Merge branch 'tr/send-email-8bit'Junio C Hamano Sun, 27 Jun 2010 19:07:45 +0000 (12:07 -0700)

Merge branch 'tr/send-email-8bit'

* tr/send-email-8bit:
send-email: ask about and declare 8bit mails

Merge branch 'js/maint-am-rebase-invalid-author'Junio C Hamano Sun, 27 Jun 2010 19:07:44 +0000 (12:07 -0700)

Merge branch 'js/maint-am-rebase-invalid-author'

* js/maint-am-rebase-invalid-author:
am: use get_author_ident_from_commit instead of mailinfo when rebasing

Merge branch 'ab/blame-textconv'Junio C Hamano Sun, 27 Jun 2010 19:07:44 +0000 (12:07 -0700)

Merge branch 'ab/blame-textconv'

* ab/blame-textconv:
t/t8006: test textconv support for blame
textconv: support for blame
textconv: make the API public

Conflicts:
diff.h

Merge branch 'jn/show-num-walks'Junio C Hamano Sun, 27 Jun 2010 19:07:44 +0000 (12:07 -0700)

Merge branch 'jn/show-num-walks'

* jn/show-num-walks:
DWIM 'git show -5' to 'git show --do-walk -5'

t6018: make sure all tested symbolic names are differen... Michael J Gruber Fri, 14 May 2010 18:26:51 +0000 (20:26 +0200)

t6018: make sure all tested symbolic names are different revs

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6018: add tests for rev-list's --branches and --tagsMichael J Gruber Fri, 14 May 2010 18:26:50 +0000 (20:26 +0200)

t6018: add tests for rev-list's --branches and --tags

so that we know when they break.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9700: Use Test::More->builder, not $Test::Builder... Ævar Arnfjörð Bjarmason Sat, 26 Jun 2010 12:42:41 +0000 (12:42 +0000)

t9700: Use Test::More->builder, not $Test::Builder::Test

$Test::Builder::Test was only made into an `our' variable in 0.94
released in September 2009, older distros are more likely to have 0.92
or earlier. Use the singleton Test::More->builder constructor instead.

The exit() call was also unportable to <0.94. Just output a meaningful
exit code if the ->is_passing method exists. The t9700-perl-git.sh
test only cares about stderr output, so this doesn't affect test
results when using older Test::More modules.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jp/string-list-api-cleanup' into jn/grep... Julian Phillips Fri, 25 Jun 2010 23:41:39 +0000 (00:41 +0100)

Merge branch 'jp/string-list-api-cleanup' into jn/grep-open

An evil merge to adjust the series to cleaned-up API.

From: Julian Phillips <julian@quantumfyre.co.uk>
Subject: [PATCH v2 7/7] grep: fix string_list_append calls
Date: Sat, 26 Jun 2010 00:41:39 +0100
Message-ID: <20100625234140.18927.35025.julian@quantumfyre.co.uk>

* jp/string-list-api-cleanup:
string_list: Fix argument order for string_list_append
string_list: Fix argument order for string_list_lookup
string_list: Fix argument order for string_list_insert_at_index
string_list: Fix argument order for string_list_insert
string_list: Fix argument order for for_each_string_list
string_list: Fix argument order for print_string_list

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

string_list: Fix argument order for string_list_appendJulian Phillips Fri, 25 Jun 2010 23:41:38 +0000 (00:41 +0100)

string_list: Fix argument order for string_list_append

Update the definition and callers of string_list_append to use the
string_list as the first argument. This helps make the string_list
API easier to use by being more consistent.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

string_list: Fix argument order for string_list_lookupJulian Phillips Fri, 25 Jun 2010 23:41:37 +0000 (00:41 +0100)

string_list: Fix argument order for string_list_lookup

Update the definition and callers of string_list_lookup to use the
string_list as the first argument. This helps make the string_list
API easier to use by being more consistent.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

string_list: Fix argument order for string_list_insert_... Julian Phillips Fri, 25 Jun 2010 23:41:36 +0000 (00:41 +0100)

string_list: Fix argument order for string_list_insert_at_index

Update the definition and callers of string_list_insert_at_index to
use the string_list as the first argument. This helps make the
string_list API easier to use by being more consistent.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

string_list: Fix argument order for string_list_insertJulian Phillips Fri, 25 Jun 2010 23:41:35 +0000 (00:41 +0100)

string_list: Fix argument order for string_list_insert

Update the definition and callers of string_list_insert to use the
string_list as the first argument. This helps make the string_list
API easier to use by being more consistent.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

string_list: Fix argument order for for_each_string_listJulian Phillips Fri, 25 Jun 2010 23:41:34 +0000 (00:41 +0100)

string_list: Fix argument order for for_each_string_list

Update the definition and callers of for_each_string_list to use the
string_list as the first argument. This helps make the string_list
API easier to use by being more consistent.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

string_list: Fix argument order for print_string_listJulian Phillips Fri, 25 Jun 2010 23:41:33 +0000 (00:41 +0100)

string_list: Fix argument order for print_string_list

Update the definition and callers of print_string_list to use the
string_list as the first argument. This helps make the API easier to
use by being more consistent.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Fri, 25 Jun 2010 18:45:27 +0000 (11:45 -0700)

Merge branch 'maint'

* maint:
msvc: Fix some compiler warnings
Documentation: grep: fix asciidoc problem with --
msvc: Fix some "expr evaluates to function" compiler warnings

Add the option "--ignore-submodules" to "git status"Jens Lehmann Fri, 25 Jun 2010 14:56:47 +0000 (16:56 +0200)

Add the option "--ignore-submodules" to "git status"

In some use cases it is not desirable that "git status" considers
submodules that only contain untracked content as dirty. This may happen
e.g. when the submodule is not under the developers control and not all
build generated files have been added to .gitignore by the upstream
developers. Using the "untracked" parameter for the "--ignore-submodules"
option disables checking for untracked content and lets git diff report
them as changed only when they have new commits or modified content.

Sometimes it is not wanted to have submodules show up as changed when they
just contain changes to their work tree (this was the behavior before
1.7.0). An example for that are scripts which just want to check for
submodule commits while ignoring any changes to the work tree. Also users
having large submodules known not to change might want to use this option,
as the - sometimes substantial - time it takes to scan the submodule work
tree(s) is saved when using the "dirty" parameter.

And if you want to ignore any changes to submodules, you can now do that
by using this option without parameters or with "all" (when the config
option status.submodulesummary is set, using "all" will also suppress the
output of the submodule summary).

A new function handle_ignore_submodules_arg() is introduced to parse this
option new to "git status" in a single location, as "git diff" already
knew it.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule: ignore dirty submodules for summary... Jens Lehmann Fri, 25 Jun 2010 14:56:02 +0000 (16:56 +0200)

git submodule: ignore dirty submodules for summary and status

The summary and status commands only care about submodule commits, so it is
rather pointless that they check for dirty work trees. This saves the time
needed to scan the submodules work tree. Even "git status" profits from these
savings when the status.submodulesummary config option is set, as this lead to
traversing the submodule work trees twice, once for status and once again for
the submodule summary. And if the submodule was just dirty, submodule summary
produced rather meaningless output anyway:

* sub 1234567...1234567 (0):

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

msvc: Fix some compiler warningsRamsay Jones Wed, 23 Jun 2010 19:47:50 +0000 (20:47 +0100)

msvc: Fix some compiler warnings

In particular, using the normal (or production) compiler
warning level (-W3), msvc complains as follows:

.../sha1.c(244) : warning C4018: '<' : signed/unsigned mismatch
.../sha1.c(270) : warning C4244: 'function' : conversion from \
'unsigned __int64' to 'unsigned long', possible loss of data
.../sha1.c(271) : warning C4244: 'function' : conversion from \
'unsigned __int64' to 'unsigned long', possible loss of data

Note that gcc issues a similar complaint about line 244 when
compiling with -Wextra.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4027,4041: Use test -s to test for an empty fileBrian Gernhardt Fri, 25 Jun 2010 17:20:48 +0000 (13:20 -0400)

t4027,4041: Use test -s to test for an empty file

The tests used a mixture of 'echo -n' (which is non-portable) and either
test_cmp or diff to check if a file is empty. The much easier and portable
method to check for an empty file is '! test -s'

While we're in t4027, there was an excess test_done. Remove it.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: Say "pass" rather than "ok" on empty lines for TAPÆvar Arnfjörð Bjarmason Thu, 24 Jun 2010 17:44:49 +0000 (17:44 +0000)

tests: Say "pass" rather than "ok" on empty lines for TAP

Lines that begin with "ok" confuse the TAP harness because it can't
distinguish them from a test counter. Work around the issue by saying
"pass" instead, which isn't a reserved TAP word.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: Skip tests in a way that makes sense under TAPÆvar Arnfjörð Bjarmason Thu, 24 Jun 2010 17:44:48 +0000 (17:44 +0000)

tests: Skip tests in a way that makes sense under TAP

SKIP messages are now part of the TAP plan. A TAP harness now knows
why a particular test was skipped and can report that information. The
non-TAP harness built into Git's test-lib did nothing special with
these messages, and is unaffected by these changes.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: output a newline before "ok" under a TAP... Ævar Arnfjörð Bjarmason Thu, 24 Jun 2010 17:44:47 +0000 (17:44 +0000)

test-lib: output a newline before "ok" under a TAP harness

Some tests in the testsuite will emit a line that doesn't end with a
newline, right before we're about to output "ok" or "not ok". This
breaks the TAP output with "Tests out of sequence" errors since a TAP
harness can't understand this:

ok 1 - A test
[some output here]ok 2 - Another test
ok 3 - Yet another test

Work around it by emitting an empty line before we're about to say
"ok" or "not ok", but only if we're running under --verbose and
HARNESS_ACTIVE=1 is set, which'll only be the case when running under
a harnesses like prove(1).

I think it's better to do this than fix each tests by adding `&& echo'
everywhere. More tests might be added that break TAP in the future,
and a human isn't going to look at the extra whitespace, since
HARNESS_ACTIVE=1 always means a harness is reading it.

The tests that had issues were:

t1007, t3410, t3413, t3409, t3414, t3415, t3416, t3412, t3404,
t5407, t7402, t7003, t9001

With this workaround the entire test suite runs without errors under:

prove -j 10 ./t[0-9]*.sh :: --verbose

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: Make the test_external_* functions TAP-awareÆvar Arnfjörð Bjarmason Thu, 24 Jun 2010 17:44:46 +0000 (17:44 +0000)

test-lib: Make the test_external_* functions TAP-aware

Before TAP we just ran the Perl test and assumed that it failed if
nothing was printed on STDERR. Continue doing that, but introduce a
`test_external_has_tap' variable which tests can set to indicate that
they're outputting TAP.

If it's set we won't output a test plan, but trust the external test
to do so. That way we can make external tests work with a TAP harness,
but still maintain compatibility with test-lib's own way of tracking
tests through the test-results directory.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: Adjust output to be valid TAP formatÆvar Arnfjörð Bjarmason Thu, 24 Jun 2010 21:52:12 +0000 (21:52 +0000)

test-lib: Adjust output to be valid TAP format

TAP, the Test Anything Protocol, is a simple text-based interface
between testing modules in a test harness. test-lib.sh's output was
already very close to being valid TAP. This change brings it all the
way there. Before:

$ ./t0005-signals.sh
* ok 1: sigchain works
* passed all 1 test(s)

And after:

$ ./t0005-signals.sh
ok 1 - sigchain works
# passed all 1 test(s)
1..1

The advantage of using TAP is that any program that reads the format
(a "test harness") can run the tests. The most popular of these is the
prove(1) utility that comes with Perl. It can run tests in parallel,
display colored output, format the output to console, file, HTML etc.,
and much more. An example:

$ prove ./t0005-signals.sh
./t0005-signals.sh .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.01 cusr 0.02 csys = 0.06 CPU)
Result: PASS

prove(1) gives you human readable output without being too
verbose. Running the test suite in parallel with `make test -j15`
produces a flood of text. Running them with `prove -j 15 ./t[0-9]*.sh`
makes it easy to follow what's going on.

All this patch does is re-arrange the output a bit so that it conforms
with the TAP spec, everything that the test suite did before continues
to work. That includes aggregating results in t/test-results/, the
--verbose, --debug and other options for tests, and the test color
output.

TAP harnesses ignore everything that they don't know about, so running
the tests with --verbose works:

$ prove ./t0005-signals.sh :: --verbose --debug
./t0005-signals.sh .. Terminated
./t0005-signals.sh .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.01 cusr 0.01 csys = 0.05 CPU)
Result: PASS

Just supply the -v option to prove itself to get all the verbose
output that it suppresses:

$ prove -v ./t0005-signals.sh :: --verbose --debug
./t0005-signals.sh ..
Initialized empty Git repository in /home/avar/g/git/t/trash directory.t0005-signals/.git/
expecting success:
test-sigchain >actual
case "$?" in
143) true ;; # POSIX w/ SIGTERM=15
3) true ;; # Windows
*) false ;;
esac &&
test_cmp expect actual
Terminated
ok 1 - sigchain works
# passed all 1 test(s)
1..1
ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.01 cusr 0.01 csys = 0.04 CPU)
Result: PASS

As a further example, consider this test script that uses a lot of
test-lib.sh features by Jakub Narebski:

#!/bin/sh

test_description='this is a sample test.

This test is here to see various test outputs.'

. ./test-lib.sh

say 'diagnostic message'

test_expect_success 'true test' 'true'
test_expect_success 'false test' 'false'

test_expect_failure 'true test (todo)' 'true'
test_expect_failure 'false test (todo)' 'false'

test_debug 'echo "debug message"'

test_done

The output of that was previously:

* diagnostic message # yellow
* ok 1: true test
* FAIL 2: false test # bold red
false
* FIXED 3: true test (todo)
* still broken 4: false test (todo) # bold green
* fixed 1 known breakage(s) # green
* still have 1 known breakage(s) # bold red
* failed 1 among remaining 3 test(s) # bold red

But is now:

diagnostic message # yellow
ok 1 - true test
not ok - 2 false test # bold red
# false
ok 3 - true test (todo) # TODO known breakage
not ok 4 - false test (todo) # TODO known breakage # bold green
# fixed 1 known breakage(s) # green
# still have 1 known breakage(s) # bold red
# failed 1 among remaining 3 test(s) # bold red
1..4

All the coloring is preserved when the test is run manually. Under
prove(1) the test performs as expected, even with --debug and
--verbose options:

$ prove ./example.sh :: --debug --verbose
./example.sh .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests
(1 TODO test unexpectedly succeeded)

Test Summary Report
-------------------
./example.sh (Wstat: 256 Tests: 4 Failed: 1)
Failed test: 2
TODO passed: 3
Non-zero exit status: 1
Files=1, Tests=4, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.01 csys = 0.03 CPU)
Result: FAIL

The TAP harness itself doesn't get confused by the color output, they
aren't used by test-lib.sh stdout isn't open to a terminal (test -t 1).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: grep: fix asciidoc problem with --Christian Couder Fri, 25 Jun 2010 02:16:24 +0000 (04:16 +0200)

Documentation: grep: fix asciidoc problem with --

Asciidoc interprets two dashes separated by spaces as a single big
dash. So let's escape the first dash, so that "\--" will properly
appear as "--".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: accept arbitrary rev-list optionsChristian Couder Mon, 14 Jun 2010 05:29:38 +0000 (00:29 -0500)

revert: accept arbitrary rev-list options

This can be useful to do something like:

git rev-list --reverse master -- README | git cherry-pick -n --stdin

without using xargs.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

url_decode: URL scheme ends with a colon and does not... Junio C Hamano Thu, 24 Jun 2010 20:36:30 +0000 (13:36 -0700)

url_decode: URL scheme ends with a colon and does not require a slash

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

git-cat-file.txt: Document --textconvMichael J Gruber Thu, 24 Jun 2010 12:56:55 +0000 (14:56 +0200)

git-cat-file.txt: Document --textconv

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow customizable commit decorations colorsNazri Ramliy Thu, 24 Jun 2010 00:21:16 +0000 (08:21 +0800)

Allow customizable commit decorations colors

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash completion: Support "divergence from upstream... Andrew Sayers Thu, 17 Jun 2010 21:32:02 +0000 (22:32 +0100)

bash completion: Support "divergence from upstream" messages in __git_ps1

Add a notification in the command prompt specifying whether (and optionally how
far) your branch has diverged from its upstream. This is especially helpful in
small teams that very frequently (forget to) push to each other.

Support git-svn upstream detection as a special case, as migrators from
centralised version control systems are especially likely to forget to push.

Support for other types of upstream than SVN should be easy to add if anyone is
so inclined.

Signed-off-by: Andrew Sayers <andrew-git@pileofstuff.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

msvc: Fix some "expr evaluates to function" compiler... Ramsay Jones Wed, 23 Jun 2010 19:40:19 +0000 (20:40 +0100)

msvc: Fix some "expr evaluates to function" compiler warnings

In particular, the following warning is issued while compiling
notes.c:

notes.c(927) : warning C4550: expression evaluates to a \
function which is missing an argument list

along with identical warnings on lines 928, 1016 and 1017.

In order to suppress the warning, we change the definition of
combine_notes_fn, so that the symbol type is an (explicit)
"pointer to function ...". As a result, several other
declarations need some minor fix-up to take account of the
new typedef.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/url-decode'Junio C Hamano Wed, 23 Jun 2010 17:43:28 +0000 (10:43 -0700)

Merge branch 'jk/url-decode'

* jk/url-decode:
url.c: "<scheme>://" part at the beginning should not be URL decoded

url.c: "<scheme>://" part at the beginning should not... Junio C Hamano Wed, 23 Jun 2010 17:27:39 +0000 (10:27 -0700)

url.c: "<scheme>://" part at the beginning should not be URL decoded

When using the protocol git+ssh:// for example we do not want to
decode the '+' as a space. The url decoding must take place only
for the server name and parameters.

This fixes a regression introduced in 9d2e942.

Initial-fix-by: Pascal Obry <pascal.obry@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.2Junio C Hamano Tue, 22 Jun 2010 17:03:04 +0000 (10:03 -0700)

Update draft release notes to 1.7.2

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

Merge branch 'jc/maint-simpler-common-prefix'Junio C Hamano Tue, 22 Jun 2010 16:45:23 +0000 (09:45 -0700)

Merge branch 'jc/maint-simpler-common-prefix'

* jc/maint-simpler-common-prefix:
common_prefix: simplify and fix scanning for prefixes

Merge branch 'sb/format-patch-signature'Junio C Hamano Tue, 22 Jun 2010 16:45:22 +0000 (09:45 -0700)

Merge branch 'sb/format-patch-signature'

* sb/format-patch-signature:
completion: Add --signature and format.signature
format-patch: Add a signature option (--signature)

Merge branch 'mg/pretty-magic-space'Junio C Hamano Tue, 22 Jun 2010 16:45:22 +0000 (09:45 -0700)

Merge branch 'mg/pretty-magic-space'

* mg/pretty-magic-space:
pretty: Introduce ' ' modifier to add space if non-empty

Conflicts:
pretty.c

Merge branch 'jn/gitweb-return-or-exit-cleanup'Junio C Hamano Tue, 22 Jun 2010 16:45:22 +0000 (09:45 -0700)

Merge branch 'jn/gitweb-return-or-exit-cleanup'

* jn/gitweb-return-or-exit-cleanup:
gitweb: Return or exit after done serving request

Conflicts:
gitweb/gitweb.perl

Merge branch 'bd/maint-unpack-trees-parawalk-fix'Junio C Hamano Tue, 22 Jun 2010 16:45:22 +0000 (09:45 -0700)

Merge branch 'bd/maint-unpack-trees-parawalk-fix'

* bd/maint-unpack-trees-parawalk-fix:
unpack-trees: Make index lookahead less pessimal

Merge branch 'cc/cherry-pick-series'Junio C Hamano Tue, 22 Jun 2010 16:45:21 +0000 (09:45 -0700)

Merge branch 'cc/cherry-pick-series'

* cc/cherry-pick-series:
Documentation/revert: describe passing more than one commit
Documentation/cherry-pick: describe passing more than one commit
revert: add tests to check cherry-picking many commits
revert: allow cherry-picking more than one commit
revert: change help_msg() to take no argument
revert: refactor code into a do_pick_commit() function
revert: use run_command_v_opt() instead of execv_git_cmd()
revert: cleanup code for -x option

Merge branch 'jc/rev-list-ancestry-path'Junio C Hamano Tue, 22 Jun 2010 16:45:21 +0000 (09:45 -0700)

Merge branch 'jc/rev-list-ancestry-path'

* jc/rev-list-ancestry-path:
revision: Turn off history simplification in --ancestry-path mode
revision: Fix typo in --ancestry-path error message
Documentation/rev-list-options.txt: Explain --ancestry-path
Documentation/rev-list-options.txt: Fix missing line in example history graph
revision: --ancestry-path

Merge branch 'lt/extended-sha1-match-commit-with-regexp'Junio C Hamano Tue, 22 Jun 2010 16:45:21 +0000 (09:45 -0700)

Merge branch 'lt/extended-sha1-match-commit-with-regexp'

* lt/extended-sha1-match-commit-with-regexp:
Make :/ accept a regex rather than a fixed pattern

Merge branch 'maint'Junio C Hamano Tue, 22 Jun 2010 16:35:36 +0000 (09:35 -0700)

Merge branch 'maint'

* maint:
Update draft release notes to 1.7.1.1
tests: remove unnecessary '^' from 'expr' regular expression

Conflicts:
diff.c

Update draft release notes to 1.7.1.1Junio C Hamano Tue, 22 Jun 2010 16:18:55 +0000 (09:18 -0700)

Update draft release notes to 1.7.1.1

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

Merge branch 'ic/maint-rebase-i-abort' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)

Merge branch 'ic/maint-rebase-i-abort' into maint

* ic/maint-rebase-i-abort:
rebase -i: Abort cleanly if new base cannot be checked out

Merge branch 'cc/maint-commit-reflog-msg' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)

Merge branch 'cc/maint-commit-reflog-msg' into maint

* cc/maint-commit-reflog-msg:
commit: use value of GIT_REFLOG_ACTION env variable as reflog message

Merge branch 'jk/maint-advice-empty-amend' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)

Merge branch 'jk/maint-advice-empty-amend' into maint

* jk/maint-advice-empty-amend:
commit: give advice on empty amend

Merge branch 'tc/commit-abbrev-fix' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)

Merge branch 'tc/commit-abbrev-fix' into maint

* tc/commit-abbrev-fix:
commit::print_summary(): don't use format_commit_message()
t7502-commit: add summary output tests for empty and merge commits
t7502-commit: add tests for summary output

Merge branch 'jn/document-rebase-i-p-limitation' into... Junio C Hamano Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)

Merge branch 'jn/document-rebase-i-p-limitation' into maint

* jn/document-rebase-i-p-limitation:
rebase -i -p: document shortcomings

Merge branch 'jn/checkout-doc' into maintJunio C Hamano Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)

Merge branch 'jn/checkout-doc' into maint

* jn/checkout-doc:
Documentation/checkout: clarify description
Documentation/checkout: clarify description

Merge branch 'cc/maint-diff-CC-binary' into maintJunio C Hamano Tue, 22 Jun 2010 16:04:14 +0000 (09:04 -0700)

Merge branch 'cc/maint-diff-CC-binary' into maint

* cc/maint-diff-CC-binary:
diff: fix "git show -C -C" output when renaming a binary file

Conflicts:
diff.c

Merge branch 'jc/t9129-any-utf8' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:53 +0000 (08:31 -0700)

Merge branch 'jc/t9129-any-utf8' into maint

* jc/t9129-any-utf8:
t9129: fix UTF-8 locale detection

Merge branch 'cb/ls-files-cdup' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:46 +0000 (08:31 -0700)

Merge branch 'cb/ls-files-cdup' into maint

* cb/ls-files-cdup:
ls-files: allow relative pathspec
quote.c: separate quoting and relative path generation

Merge branch 'tc/merge-m-log' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:25 +0000 (08:31 -0700)

Merge branch 'tc/merge-m-log' into maint

* tc/merge-m-log:
merge: --log appends shortlog to message if specified
fmt-merge-msg: add function to append shortlog only
fmt-merge-msg: refactor merge title formatting
fmt-merge-msg: minor refactor of fmt_merge_msg()
merge: rename variable
merge: update comment
t7604-merge-custom-message: show that --log doesn't append to -m
t7604-merge-custom-message: shift expected output creation

Merge branch 'ph/clone-message-reword' into maintJunio C Hamano Tue, 22 Jun 2010 15:31:20 +0000 (08:31 -0700)

Merge branch 'ph/clone-message-reword' into maint

* ph/clone-message-reword:
clone: reword messages to match the end-user perception

Merge branch 'jn/maint-amend-missing-name' into maintJunio C Hamano Tue, 22 Jun 2010 15:30:44 +0000 (08:30 -0700)

Merge branch 'jn/maint-amend-missing-name' into maint

* jn/maint-amend-missing-name:
commit --amend: cope with missing display name

Merge branch 'pc/remove-warn' into maintJunio C Hamano Tue, 22 Jun 2010 15:30:38 +0000 (08:30 -0700)

Merge branch 'pc/remove-warn' into maint

* pc/remove-warn:
Remove a redundant errno test in a usage of remove_path
Introduce remove_or_warn function
Implement the rmdir_or_warn function
Generalise the unlink_or_warn function

tests: remove unnecessary '^' from 'expr' regular expre... Junio C Hamano Mon, 21 Jun 2010 18:18:54 +0000 (11:18 -0700)

tests: remove unnecessary '^' from 'expr' regular expression

As Brandon noticed, a regular expression match given to 'expr' is already
anchored at the beginning. Some versions of expr even complain about this.

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

t/t7811-grep-open.sh: remove broken/redundant creation... Brandon Casey Mon, 21 Jun 2010 17:37:15 +0000 (12:37 -0500)

t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script

The fake "less" script was already created in a previous test titled
'setup: fake "less"', so it is redundant. Additionally, it is broken since
the redirection of 'cat' is to a file named 'less', but the chmod operates
on the file named by the $less variable which may not contain the value
'less'.

So, just remove this code, and rely on the creation of the fake "less"
script performed earlier within the test script.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>