gitweb.git
parse-options: clarify PARSE_OPT_NOARG descriptionJonathan Nieder Sun, 22 Aug 2010 16:26:38 +0000 (21:56 +0530)

parse-options: clarify PARSE_OPT_NOARG description

Here "takes no argument" means "does not take an argument". The
latter phrasing might make it clearer that PARSE_OPT_NOARG does not
make an option with an argument that can optionally be left off.

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

t3302 (notes): Port to SolarisJonathan Nieder Tue, 24 Aug 2010 07:14:53 +0000 (02:14 -0500)

t3302 (notes): Port to Solaris

The time_notes script, which uses POSIX shell features, is
currently sometimes run with a non-POSIX /bin/sh.

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

t7606: Avoid using head as a file nameBrian Gernhardt Mon, 23 Aug 2010 20:15:47 +0000 (16:15 -0400)

t7606: Avoid using head as a file name

A file named 'head' gets confused with the HEAD ref on
case-insensitive file systems. Replace '>head' with '>head.new' to
match the '>head.old' files they are compared to.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

do not pass "git -c foo=bar" params to transport helpersJonathan Nieder Tue, 24 Aug 2010 06:41:14 +0000 (01:41 -0500)

do not pass "git -c foo=bar" params to transport helpers

Like $GIT_CONFIG, $GIT_CONFIG_PARAMETERS needs to be suppressed by
"git push" and its cousins when running local transport helpers to
imitate remote transport well.

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

pass "git -c foo=bar" params through environmentJeff King Mon, 23 Aug 2010 19:16:00 +0000 (15:16 -0400)

pass "git -c foo=bar" params through environment

Git uses the "-c foo=bar" parameters to set a config
variable for a single git invocation. We currently do this
by making a list in the current process and consulting that
list in git_config.

This works fine for built-ins, but the config changes are
silently ignored by subprocesses, including dashed externals
and invocations to "git config" from shell scripts.

This patch instead puts them in an environment variable
which we consult when looking at config (both internally and
via calls "git config").

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

Work around em-dash handling in newer AsciiDocJunio C Hamano Mon, 23 Aug 2010 21:20:25 +0000 (14:20 -0700)

Work around em-dash handling in newer AsciiDoc

Older versions of AsciiDoc used to literally pass double dashes when we
used them in our linkgit macros and manpage titles, but newer ones (the
issue was first reported with AsciiDoc 8.5.2) turn them into em dashes.

Define litdd (literal double-dash) custom attribute in asciidoc.conf to
work this around. While we are at it, fix a few double-dashes (e.g. the
description of "project--devo--version" convention used by tla, among
other things) that used to be incorrectly written as em dashes in the body
text to also use this attribute.

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

t7610: cd inside subshell instead of aroundBrian Gernhardt Tue, 24 Aug 2010 02:37:24 +0000 (22:37 -0400)

t7610: cd inside subshell instead of around

Instead of using `cd dir && (...) && cd..` use `(cd dir && ...)`

This ensures that the test doesn't get caught in the subdirectory if
there is an error in the subshell.

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

clone: warn users --depth is ignored in local clonesNguyễn Thái Ngọc Duy Mon, 23 Aug 2010 12:08:22 +0000 (22:08 +1000)

clone: warn users --depth is ignored in local clones

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

git-bundle.txt: Clarify rev-list-args restrictionsMichael J Gruber Mon, 23 Aug 2010 09:02:39 +0000 (11:02 +0200)

git-bundle.txt: Clarify rev-list-args restrictions

Currently, one could think that 'git bundle create' groks
any 'git rev-list' expression. But in fact it requires a named reference
to be present. Try and make this clearer.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-bundle.txt: whitespace cleanupMichael J Gruber Mon, 23 Aug 2010 09:02:38 +0000 (11:02 +0200)

git-bundle.txt: whitespace cleanup

Use tabs, not 7 spaces.

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

git-bundle.txt: CleanupMichael J Gruber Mon, 23 Aug 2010 09:02:37 +0000 (11:02 +0200)

git-bundle.txt: Cleanup

Cleanup various spellings of the same argument, as well as the code
for the tilde: Since neither '~' nor '\~' work consistently, use
'{tilde}'.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 23 Aug 2010 03:18:37 +0000 (20:18 -0700)

Merge branch 'maint'

* maint:
Typos in code comments, an error message, documentation

Typos in code comments, an error message, documentationRalf Wildenhues Sun, 22 Aug 2010 11:12:12 +0000 (13:12 +0200)

Typos in code comments, an error message, documentation

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Typos in code comments, an error message, documentationRalf Wildenhues Sun, 22 Aug 2010 11:12:12 +0000 (13:12 +0200)

Typos in code comments, an error message, documentation

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

autoconf: regex library detection typofixJunio C Hamano Sun, 22 Aug 2010 16:44:45 +0000 (09:44 -0700)

autoconf: regex library detection typofix

fix >4GiB source delta assertion failureNicolas Pitre Sat, 21 Aug 2010 05:00:13 +0000 (01:00 -0400)

fix >4GiB source delta assertion failure

When people try insane things such as delta-compressing 4GiB files, they
get this assertion:

diff-delta.c:285: create_delta_index: Assertion `packed_entry - (struct index_entry *)mem == entries' failed.

This happens because:

1) the 'entries' variable is an unsigned int

2) it is assigned with entries = (bufsize - 1) / RABIN_WINDOW
(that itself is not a problem unless bufsize > 4G * RABIN_WINDOW)

3) the buffer is indexed from top to bottom starting at
"data = buffer + entries * RABIN_WINDOW" and the multiplication
here does indeed overflows, making the resulting top of the buffer
much lower than expected.

This makes the number of actually produced index entries smaller than
what was computed initially, hence the assertion.

Furthermore, the current delta encoding format cannot represent offsets
into a reference buffer with more than 32 bits anyway. So let's just
limit the number of entries to what the delta format can encode.

Reported-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: update DocumentationJon Seymour Sat, 21 Aug 2010 04:09:04 +0000 (14:09 +1000)

detached-stash: update Documentation

Update the documentation to indicate that git stash branch only attempts
to drop the specified stash if it looks like stash reference.

Also changed the synopsis to more clearly indicate which commands require
a stash entry reference as opposed to merely a stash-like commit.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: tests of git stash with stash-like... Jon Seymour Sat, 21 Aug 2010 04:09:03 +0000 (14:09 +1000)

detached-stash: tests of git stash with stash-like arguments

Adds new tests which check that:
* git stash branch handles a stash-like argument when there is a stash stack
* git stash branch handles a stash-like argument when there is not a stash stack
* git stash show handles a stash-like argument when there is a stash stack
* git stash show handles a stash-like argument when there is not a stash stack
* git stash drop fails early if the specified argument is not a stash reference
* git stash pop fails early if the specified argument is not a stash reference
* git stash * fails early if the reference supplied is bogus
* git stash fails early with stash@{n} where n >= length of stash log

Helped-by: Johannes Sixt
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: simplify git stash showJon Seymour Sat, 21 Aug 2010 04:09:02 +0000 (14:09 +1000)

detached-stash: simplify git stash show

This commit refactors git stash show to make use of the assert_stash_like function.

git show now dies if the presented argument is non-stash-like.

Previous behaviour was to tolerate commits that were not even stash-like.

Previously, git stash show would accept stash-like arguments, but
only if there was a stash on the stack.

Now, git stash accepts stash-like arguments always and only fails
if no stash-like argument is specified and there is no stash stack.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: simplify git stash branchJon Seymour Sat, 21 Aug 2010 04:09:01 +0000 (14:09 +1000)

detached-stash: simplify git stash branch

This patch teaches git stash branch to tolerate stash-like arguments.

In particular, a stash is only required if an argument isn't specified
and the stash is only dropped if a stash entry reference was
specified or implied.

The implementation has been simplified by taking advantage of
assert_stash_like() and the variables established by
parse_flags_and_rev().

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: refactor git stash pop implementationJon Seymour Sat, 21 Aug 2010 04:09:00 +0000 (14:09 +1000)

detached-stash: refactor git stash pop implementation

git stash pop is abstracted into its own implementation function - pop_stash.

The behaviour is changed so that git stash pop fails early if the
the specified stash reference does not exist or does not refer to
an extant entry in the reflog of the reference stash.

This fixes the case where the apply succeeds, but the drop fails.
Previously this caused caused git stash pop to exit with a non-zero exit code
and a dirty tree.

Now, git stash pop fails with a non-zero exit code, but the working
tree is not modified.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: simplify stash_dropJon Seymour Sat, 21 Aug 2010 04:08:59 +0000 (14:08 +1000)

detached-stash: simplify stash_drop

Previously, git stash drop would fail noisily while executing git reflog
delete if the specified revision was not a stash reference.

Now, git stash drop fails with an error message which more precisely
indicates the reason for failure.

Furthermore, git stash drop will now fail with a non-zero status code
if stash@{n} specifies a stash log entry that does not actually exist.

This change in behaviour is achieved by delegating argument parsing
to the common parse_flags_and_rev() function (via a call to
assert_stash_ref).

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: simplify stash_applyJon Seymour Sat, 21 Aug 2010 04:08:58 +0000 (14:08 +1000)

detached-stash: simplify stash_apply

The implementation of stash_apply() is simplified to take
advantage of the common parsing function parse_flags_and_rev().

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: work around git rev-parse failure to... Jon Seymour Sat, 21 Aug 2010 04:48:05 +0000 (14:48 +1000)

detached-stash: work around git rev-parse failure to detect bad log refs

This commit is required because git rev-parse in 1.7.2 does not correctly
indicate invalid log references using a non-zero status code.

We use a proxy for the condition (non-empty error output) as
a substitute. This commit can be reverted when, and if, rev-parse
is fixed to indicate invalid log references with a status code.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

detached-stash: introduce parse_flags_and_revs functionJon Seymour Sat, 21 Aug 2010 04:46:22 +0000 (14:46 +1000)

detached-stash: introduce parse_flags_and_revs function

Introduce parse_flags_and_revs. This function requires that
there is at most one stash-like revision parameter and
zero or more flags.

It knows how to parse -q,--quiet and --index flags, but leaves
other flags parsed.

Specified revisions are checked to see that they are at
least stash-like (meaning: they look like something created
by git stash save or git stash create).

If this is so, then IS_STASH_LIKE is initialized to a non-empty value.

If the specified revision also looks like a stash log entry reference,
then IS_STASH_REF is initialized to a non-empty value.

References of the form ref@{spec} are required to precisely identify
an individual commit.

If no reference is specified, stash@{0} is assumed.

Once the specified reference is validated to be at least stash_like
an ensemble of derived variables, (w_commit, w_tree, b_commit, etc)
is initialized with a single call to git rev-parse.

Repeated calls to parse_flags_and_rev() avoid repeated calls
to git rev-parse if the specified arguments have already been
parsed.

Subsequent patches in the series modify the existing
git stash subcommands to make use of these functions
as appropriate.

An ensemble of supporting functions that make use of the state
established by parse_flags_and_rev(). These are described below:

The ancillary functions are:

is_stash_like(): which can be used to test
whether a specified commit looks like a commit created with
git stash save or git stash create.

assert_stash_like(): which can be used by
commands that misbehave unless their arguments stash-like.

is_stash_ref(): which checks whether an argument
is valid stash reference(e.g. is of the form
['refs/']stash['@{'something'}])

assert_stash_ref(): which can be used by commands
that misbehave unless their arguments are both stash-like and
refer to valid stash entries.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mm/rebase-i-exec'Junio C Hamano Sun, 22 Aug 2010 06:29:11 +0000 (23:29 -0700)

Merge branch 'mm/rebase-i-exec'

* mm/rebase-i-exec:
git-rebase--interactive.sh: use printf instead of echo to print commit message
git-rebase--interactive.sh: rework skip_unnecessary_picks
test-lib: user-friendly alternatives to test [-d|-f|-e]
rebase -i: add exec command to launch a shell command

Conflicts:
git-rebase--interactive.sh
t/t3404-rebase-interactive.sh

Merge branch 'gb/split-cmdline-errmsg'Junio C Hamano Sun, 22 Aug 2010 06:28:55 +0000 (23:28 -0700)

Merge branch 'gb/split-cmdline-errmsg'

* gb/split-cmdline-errmsg:
split_cmdline: Allow caller to access error string

Merge branch 'so/http-user-agent'Junio C Hamano Sun, 22 Aug 2010 06:28:38 +0000 (23:28 -0700)

Merge branch 'so/http-user-agent'

* so/http-user-agent:
Allow HTTP user agent string to be modified.

Merge branch 'mm/shortopt-detached'Junio C Hamano Sun, 22 Aug 2010 06:28:31 +0000 (23:28 -0700)

Merge branch 'mm/shortopt-detached'

* mm/shortopt-detached:
log: parse separate option for --glob
log: parse separate options like git log --grep foo
diff: parse separate options --stat-width n, --stat-name-width n
diff: split off a function for --stat-* option parsing
diff: parse separate options like -S foo

Conflicts:
revision.c

Merge branch 'sr/local-config'Junio C Hamano Sun, 22 Aug 2010 06:28:09 +0000 (23:28 -0700)

Merge branch 'sr/local-config'

* sr/local-config:
config: add --local option

Merge branch 'nd/fix-sparse-checkout'Junio C Hamano Sun, 22 Aug 2010 06:28:05 +0000 (23:28 -0700)

Merge branch 'nd/fix-sparse-checkout'

* nd/fix-sparse-checkout:
unpack-trees: mark new entries skip-worktree appropriately
unpack-trees: do not check for conflict entries too early
unpack-trees: let read-tree -u remove index entries outside sparse area
unpack-trees: only clear CE_UPDATE|CE_REMOVE when skip-worktree is always set
t1011 (sparse checkout): style nitpicks

Merge branch 'hv/submodule-find-ff-merge'Junio C Hamano Sun, 22 Aug 2010 06:27:59 +0000 (23:27 -0700)

Merge branch 'hv/submodule-find-ff-merge'

* hv/submodule-find-ff-merge:
Implement automatic fast-forward merge for submodules
setup_revisions(): Allow walking history in a submodule
Teach ref iteration module about submodules

Conflicts:
submodule.c

Merge branch 'en/rebase-against-rebase-fix'Junio C Hamano Sun, 22 Aug 2010 06:27:29 +0000 (23:27 -0700)

Merge branch 'en/rebase-against-rebase-fix'

* en/rebase-against-rebase-fix:
pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches
t5520-pull: Add testcases showing spurious conflicts from git pull --rebase

Merge branch 'dg/local-mod-error-messages'Junio C Hamano Sun, 22 Aug 2010 06:26:46 +0000 (23:26 -0700)

Merge branch 'dg/local-mod-error-messages'

* dg/local-mod-error-messages:
t7609: test merge and checkout error messages
unpack_trees: group error messages by type
merge-recursive: distinguish "removed" and "overwritten" messages
merge-recursive: porcelain messages for checkout
Turn unpack_trees_options.msgs into an array + enum

Conflicts:
t/t3400-rebase.sh

Merge branch 'po/userdiff-csharp'Junio C Hamano Sun, 22 Aug 2010 06:20:51 +0000 (23:20 -0700)

Merge branch 'po/userdiff-csharp'

* po/userdiff-csharp:
Userdiff patterns for C#

Merge branch 'ab/perl-install'Junio C Hamano Sun, 22 Aug 2010 06:20:31 +0000 (23:20 -0700)

Merge branch 'ab/perl-install'

* ab/perl-install:
perl/Makefile: Unset INSTALL_BASE when making perl.mak

reset: suggest what to do upon "git reset --mixed ... Ævar Arnfjörð Bjarmason Sun, 15 Aug 2010 08:43:20 +0000 (08:43 +0000)

reset: suggest what to do upon "git reset --mixed <paths>"

When you call "git reset --mixed <paths>" git will warn that using mixed
with paths is deprecated:

warning: --mixed option is deprecated with paths.

That doesn't tell the user what he should use instead. Expand on the
warning and tell the user to just omit --mixed:

warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead

The exact wording of the warning was suggested by Jonathan Nieder.

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

Merge branch 'maint'Junio C Hamano Sun, 22 Aug 2010 06:16:32 +0000 (23:16 -0700)

Merge branch 'maint'

* maint:
t7403: add missing &&'s
Tell ignore file about generate files in /gitweb/static

apply: handle traditional patches with space in filenameJonathan Nieder Thu, 19 Aug 2010 01:50:14 +0000 (20:50 -0500)

apply: handle traditional patches with space in filename

To discover filenames from the --- and +++ lines in a traditional
unified diff, currently "git apply" scans forward for a whitespace
character on each line and stops there. It can't use the whole line
because "diff -u" likes to include timestamps, like so:

--- foo 2000-07-12 16:56:50.020000414 -0500
+++ bar 2010-07-12 16:56:50.020000414 -0500

The whitespace-seeking heuristic works great, even when the tab
has been converted to spaces by some email + copy-and-paste
related corruption.

Except for one problem: if the filename itself contains whitespace,
the inferred filename will be too short.

When Giuseppe ran into this problem, it was for a file creation
patch (for debian/licenses/LICENSE.global BSD-style Chromium).
So one can't use the list of files present in the index to deduce an
appropriate filename (not to mention that way lies madness; see
v0.99~402, 2005-05-31).

Instead, look for a timestamp and use that if present to mark the end
of the filename. If no timestamp is present, the old heuristic is
used, with one exception: the space character \040 is not considered
terminating whitespace any more unless it is followed by a timestamp.

Reported-by: Giuseppe Iuculano <iuculano@debian.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: exercise "git apply" with weird filenamesJonathan Nieder Thu, 19 Aug 2010 01:48:03 +0000 (20:48 -0500)

tests: exercise "git apply" with weird filenames

Check that "git apply" can cope with strange filenames, particularly
filenames with spaces.

Not all platforms have a sane enough diff -u and expand to
reliably create the such patches and maybe future versions of GNU
diff will handle funny characters differently, so this uses
pre-generated patches. The script used to generate them is in
t/t4135/make-patches.

Filenames with tabs are not usable on NTFS; use something like the
FUNNYNAMES prerequisite from v1.3.0-rc1~67 (2006-03-03) to skip the
relevant tests when appropriate. The detection is not shared in
test-lib.sh to avoid wasting time while running other test scripts.

Backslash is the path separator on Windows, so do not used it in
file names there (v1.6.3-rc0~93^2~6, 2009-03-13).

Finally, filenames starting with a quotation mark do not behave well
in msys (see v1.7.0-rc0~94^2, t4030, t4031: work around bogus MSYS
bash path conversion, 2010-01-01), so skip those tests on Windows,
too.

Helped-by: Andreas Schwab <schwab@linux-m68k.org>
Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: split quoted filename handling into new functionJonathan Nieder Thu, 19 Aug 2010 01:46:46 +0000 (20:46 -0500)

apply: split quoted filename handling into new function

The new find_name_gnu() function handles new-style '--- "a/foo"'
patch header lines, leaving find_name() itself a bit less
daunting.

Functional change: do not clobber the p-value when there are not
enough path components in a quoted file name to honor it.

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

t7403: add missing &&'sJens Lehmann Wed, 18 Aug 2010 21:20:33 +0000 (23:20 +0200)

t7403: add missing &&'s

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

Tell ignore file about generate files in /gitweb/staticMark Rada Sat, 21 Aug 2010 16:18:37 +0000 (12:18 -0400)

Tell ignore file about generate files in /gitweb/static

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs: fix Makefile dependency for user manualJeff King Sat, 21 Aug 2010 06:21:22 +0000 (02:21 -0400)

docs: fix Makefile dependency for user manual

We use our custom xsl file to build the user manual, so make
sure we depend on it. We don't use it anywhere else, so we
can stick it straight in the rule.

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

Documentation: remove stray backslash in show-branch... Jonathan Nieder Fri, 20 Aug 2010 10:37:06 +0000 (05:37 -0500)

Documentation: remove stray backslash in show-branch discussion

Because there is no unescaped apostrophe to pair it with, asciidoc
does not consider this apostrophe a candidate for escaping and
the backslash passes through.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: remove stray backslashes from "Fighting... Jonathan Nieder Fri, 20 Aug 2010 10:40:31 +0000 (05:40 -0500)

Documentation: remove stray backslashes from "Fighting regressions" article

The intended text is "it's O(N * T) vs O(N * T * M)". Asciidoc
notices the spaces around the asterisks so there is no need to
escape them (and if you try, it passes the backslashes through).

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

Documentation: do not convert ... operator to ellipsesJonathan Nieder Fri, 20 Aug 2010 10:39:48 +0000 (05:39 -0500)

Documentation: do not convert ... operator to ellipses

The symmetric difference or merge-base operator ... as used by
rev-list and diff is actually three period characters. If it
gets replaced by an ellipsis glyph in the manual, that would
stop readers from copying and pasting it.

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

Documentation: avoid stray backslash in user manualJonathan Nieder Fri, 20 Aug 2010 10:38:14 +0000 (05:38 -0500)

Documentation: avoid stray backslash in user manual

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

Documentation: avoid stray backslashes in core tutorialJonathan Nieder Fri, 20 Aug 2010 10:37:51 +0000 (05:37 -0500)

Documentation: avoid stray backslashes in core tutorial

While at it:

- remove some single-quotes that were being rendered as ’\n\';

- do not escape ellipses (...) when they do not represent the
literal three characters "...". We may want to ensure the
manpages render these as three ASCII periods to make the
manual pages easier to search, but that would be a global
output generation setting, not a context-specific thing;

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: remove stray backslashes in rev-parse... Jonathan Nieder Fri, 20 Aug 2010 10:35:03 +0000 (05:35 -0500)

Documentation: remove stray backslashes in rev-parse manual

Use the {asterisk} entity instead of \* or * to avoid both
stray backslashes in output and suppression of asterisks
misinterpreted as a bold-text delimiter.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: remove backslash before ~ in fast-import... Jonathan Nieder Fri, 20 Aug 2010 10:34:29 +0000 (05:34 -0500)

Documentation: remove backslash before ~ in fast-import manual

Use the {tilde} entity to get a literal tilde without fuss.
With \~, asciidoc 8.5.2 (and probably earlier versions) keeps the
backslash in the output.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: remove stray backslash from "git bundle... Jonathan Nieder Fri, 20 Aug 2010 10:33:48 +0000 (05:33 -0500)

Documentation: remove stray backslash from "git bundle" manual

In v1.6.2.2~6^2~4 (Documentation: minor grammatical fixes
and rewording in git-bundle.txt, 2009-03-22), backslashes were
introduced before ~ to avoid introducing unintentional
superscripts. In one paragraph there is only one ~, though,
making that not a candidate for quoting, and asciidoc 8.5.8
passes the backslash through so the man page says "\~10..master".

Maybe there is an asciidoc behavior change involved.

In any case, we should replace tildes with a {tilde} entity which
means the same thing regardless of where it is found.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Cc: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/technical: avoid stray backslash in parse... Jonathan Nieder Fri, 20 Aug 2010 10:32:36 +0000 (05:32 -0500)

Documentation/technical: avoid stray backslash in parse-options API docs

Due to some unpleasant interaction between the `quote', 'italics',
and `monospace` rules, a certain paragraph ends up rendered like so:

‘short` is a character for the short option
(e.g. <tt>'e\’</tt> for <tt>-e</tt>, use <tt>0</tt> to omit),

Use the {apostrophe} to avoid this.

While at it, escape "->" strings: they are meant as a literal
two-character C operator, not a right-pointing arrow.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: remove backslashes in manpage synopsesJonathan Nieder Fri, 20 Aug 2010 10:31:58 +0000 (05:31 -0500)

Documentation: remove backslashes in manpage synopses

For some reason, various manual pages have an asterisk escaped
with \ in the synopsis. Since there is no other asterisk to pair it
with, Asciidoc does not consider this asterisk escapable, so it passes
the backslash through.

Each page either uses [verse] or has only one asterisk, so it
is safe to drop the backslashes (checked with asciidoc 8.5.2).

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

Documentation: clarify quoting in gitignore docsJonathan Nieder Fri, 20 Aug 2010 10:30:56 +0000 (05:30 -0500)

Documentation: clarify quoting in gitignore docs

An asterisk in "Documentation/*.txt" quoted with \ to avoid bold text
is being output as \* because asciidoc does not consider it a
candidate for escaping (there is no matching * to pair it with).

So the manual looks like it is saying that one should write
"Documentation/\*.txt" in the .gitignore file.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: clarify quoting in "git rm" exampleJonathan Nieder Fri, 20 Aug 2010 10:30:24 +0000 (05:30 -0500)

Documentation: clarify quoting in "git rm" example

Intended output:

git rm Documentation/\*.txt
Removes all *.txt files from the index that are under
the Documentation directory and any of its
subdirectories.

Note that the asterisk * is quoted from the shell in
this example; this lets git, and not the shell, expand
the pathnames of files and subdirectories under the
Documentation/ directory.

Without this change, there are too many backslashes output.
Tested with asciidoc 8.5.2.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Cc: Carl Worth <cworth@cworth.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: add missing quotes to "git grep" examplesJonathan Nieder Fri, 20 Aug 2010 10:28:53 +0000 (05:28 -0500)

Documentation: add missing quotes to "git grep" examples

Without an indication to the contrary, Asciidoc puts 'quoted
text' in italics, making the output look like this:

git grep time_t -- *.[ch]
Looks for time_t in all tracked .c and .h
files in the working directory and its subdirectories.

git grep -e '#define\' --and \( -e MAX_PATH -e PATH_MAX \)
Looks for a line that has #define and either MAX_PATH or
PATH_MAX.

In the first example, the *.[ch] argument needs to be protected from
the shell, or else it will only match files in the current directory.
The second example has a stray backslash.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Cc: Mark Lodato <lodatom@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: clarify quoting in "git add" exampleJonathan Nieder Fri, 20 Aug 2010 10:26:13 +0000 (05:26 -0500)

Documentation: clarify quoting in "git add" example

The intended text looks like this:

· Adds content from all *.txt files under Documentation
directory and its subdirectories:

$ git add Documentation/\*.txt

Note that the asterisk * is quoted from the shell in this
example; this lets the command include the files from
subdirectories of Documentation/ directory.

The current asciidoc 8.5.2 output has a backslash before _every_
asterisk, which is more confusing than it needs to be.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: unbreak regex in show-ref manualJonathan Nieder Fri, 20 Aug 2010 10:23:54 +0000 (05:23 -0500)

Documentation: unbreak regex in show-ref manual

I am not sure why, but the regular expression "(?:\^\{\})" gets
rendered by asciidoc as "(?:\{})". The intent seems to be a regex
matching the literal string "^{}", so this rewrites the markup to
produce "(?:\^{})" as output.

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

Documentation: quoting trouble in "git rm" discussionJonathan Nieder Fri, 20 Aug 2010 10:21:53 +0000 (05:21 -0500)

Documentation: quoting trouble in "git rm" discussion

The current output (with Asciidoc 8.5.2) seems a bit broken:

given two directories ‘d` and d2, there is a difference
between using git rm 'd*’ and ‘git rm 'd/\*\’`, as the
former will also remove all of directory d2.

In other words, the markup parses as

given two directories << d` and _d2_, there is a difference
between using _git rm 'd* >>_ and << git rm 'd/\*\ >> `.

I suspect there is an asciidoc bug involved (why is ' a candidate
closing-quote mark when it is preceded by a backslash?) but with
all the meanings of ` and ' involved I do not want to track it
down. Better to use unambiguous {asterisk} and {apostrophe}
entities.

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

Documentation: tweak description of log.dateJonathan Nieder Fri, 20 Aug 2010 10:20:36 +0000 (05:20 -0500)

Documentation: tweak description of log.date

The markup "'git log'\'s" produces a stray backslash in the
produced man page. Removing the backslash fixes it.

While at it, tweak the surrounding description for readability.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetool: Remove explicit references to /dev/ttyCharles Bailey Fri, 20 Aug 2010 15:25:09 +0000 (16:25 +0100)

mergetool: Remove explicit references to /dev/tty

mergetool used /dev/tty to switch back to receiving input from the user
via inside a block with a redirected stdin.

This harms testability, so change mergetool to save its original stdin
to an alternative fd in this block and restore it for those sub-commands
that need the original stdin.

Includes additional compatibility fix from Jonathan Nieder.

Tested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Fri, 20 Aug 2010 19:55:41 +0000 (12:55 -0700)

Merge branch 'maint'

* maint:
xmalloc: include size in the failure message

Merge branch 'jc/maint-follow-rename-fix' into maintJunio C Hamano Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)

Merge branch 'jc/maint-follow-rename-fix' into maint

* jc/maint-follow-rename-fix:
log: test for regression introduced in v1.7.2-rc0~103^2~2
diff --follow: do call diffcore_std() as necessary
diff --follow: do not waste cycles while recursing

Merge branch 'jn/maint-plug-leak' into maintJunio C Hamano Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)

Merge branch 'jn/maint-plug-leak' into maint

* jn/maint-plug-leak:
write-tree: Avoid leak when index refers to an invalid object
read-tree: stop leaking tree objects
core: Stop leaking ondisk_cache_entrys

Merge branch 'jn/fix-abbrev' into maintJunio C Hamano Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)

Merge branch 'jn/fix-abbrev' into maint

* jn/fix-abbrev:
examples/commit: use --abbrev for commit summary
checkout, commit: remove confusing assignments to rev.abbrev
archive: abbreviate substituted commit ids again

Merge branch 'vs/doc-spell' into maintJunio C Hamano Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)

Merge branch 'vs/doc-spell' into maint

* vs/doc-spell:
Documentation: spelling fixes

Merge branch 'jn/rebase-rename-am' into maintJunio C Hamano Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)

Merge branch 'jn/rebase-rename-am' into maint

* jn/rebase-rename-am:
rebase: protect against diff.renames configuration
t3400 (rebase): whitespace cleanup
Teach "apply --index-info" to handle rename patches
t4150 (am): futureproof against failing tests
t4150 (am): style fix

Merge branch 'jn/doc-pull' into maintJunio C Hamano Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)

Merge branch 'jn/doc-pull' into maint

* jn/doc-pull:
Documentation: flesh out “git pull” description

Merge branch 'bc/use-more-hardlinks-in-install' into... Junio C Hamano Fri, 20 Aug 2010 19:53:07 +0000 (12:53 -0700)

Merge branch 'bc/use-more-hardlinks-in-install' into maint

* bc/use-more-hardlinks-in-install:
Makefile: make hard/symbolic links for non-builtins too
Makefile: link builtins residing in bin directory to main git binary too

Merge branch 'tr/rfc-reset-doc' into maintJunio C Hamano Fri, 20 Aug 2010 19:53:07 +0000 (12:53 -0700)

Merge branch 'tr/rfc-reset-doc' into maint

* tr/rfc-reset-doc:
Documentation/reset: move "undo permanently" example behind "make topic"
Documentation/reset: reorder examples to match description
Documentation/reset: promote 'examples' one section up
Documentation/reset: separate options by mode
Documentation/git-reset: reorder modes for soft-mixed-hard progression

builtin/checkout: Fix message when switching to an... Ramkumar Ramachandra Fri, 20 Aug 2010 17:41:47 +0000 (23:11 +0530)

builtin/checkout: Fix message when switching to an existing branch

Fix "Switched to a new branch <name>" to read "Switched to branch
<name>" when <name> corresponds to an existing branch. This bug was
introduced in 02ac983 while introducing the `-B` switch.

Cc: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: set a !DOCTYPE for user manualJonathan Nieder Fri, 20 Aug 2010 05:04:02 +0000 (00:04 -0500)

Documentation: set a !DOCTYPE for user manual

asciidoc already takes care of including a doctype for most of the
HTML documentation, but the user manual which is processed with
docbook-xsl directly lacks one (at least with Debian docbook-xsl
1.75.2+dfsg-5). This makes it harder to automatically validate the
HTML.

Reported-by: 積丹尼 <jidanni@jidanni.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

xmalloc: include size in the failure messageMatthieu Moy Fri, 20 Aug 2010 15:09:51 +0000 (17:09 +0200)

xmalloc: include size in the failure message

Out-of-memory errors can either be actual lack of memory, or bugs (like
code trying to call xmalloc(-1) by mistake). A little more information
may help tracking bugs reported by users.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: Avoid excessive output for and reproce... Elijah Newren Fri, 20 Aug 2010 12:55:40 +0000 (06:55 -0600)

merge-recursive: Avoid excessive output for and reprocessing of renames

In 5a2580d (merge_recursive: Fix renames across paths below D/F conflicts
2010-07-09) and ae74548 (merge-recursive: Fix multiple file rename across
D/F conflict 2010-08-17), renames across D/F conflicts were fixed by
making process_renames() consider as unprocessed renames whose dst_entry
"still" had higher stage entries. The assumption was that those higher
stage entries would have been cleared out of dst_entry by that point in
cases where the conflict could be resolved (normal renames with no D/F
conflicts). That is not the case -- higher stage entries will remain in
all cases.

Fix this by checking for higher stage entries corresponding to D/F
conflicts, namely that stages 2 and 3 have exactly one nonzero mode between
them. The nonzero mode stage corresponds to a file at the path, while the
stage with a zero mode will correspond to a directory at that path (since
rename/delete conflicts will have already been handled before this codepath
is reached.)

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint' to sync with 1.7.2.2Junio C Hamano Thu, 19 Aug 2010 23:04:41 +0000 (16:04 -0700)

Merge branch 'maint' to sync with 1.7.2.2

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

Git 1.7.2.2 v1.7.2.2Junio C Hamano Thu, 19 Aug 2010 23:03:18 +0000 (16:03 -0700)

Git 1.7.2.2

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

Merge branch 'tr/xsize-bits' into maintJunio C Hamano Thu, 19 Aug 2010 22:49:54 +0000 (15:49 -0700)

Merge branch 'tr/xsize-bits' into maint

* tr/xsize-bits:
xsize_t: check whether we lose bits

Merge branch 'jc/sha1-name-find-fix' into maintJunio C Hamano Thu, 19 Aug 2010 22:49:24 +0000 (15:49 -0700)

Merge branch 'jc/sha1-name-find-fix' into maint

* jc/sha1-name-find-fix:
sha1_name.c: fix parsing of ":/token" syntax

Conflicts:
sha1_name.c

autoconf: don't use platform regex if it lacks REG_STARTENDJonathan Nieder Tue, 17 Aug 2010 09:24:42 +0000 (09:24 +0000)

autoconf: don't use platform regex if it lacks REG_STARTEND

If the platform regex cannot match null bytes, we might as well
use the glibc version instead.

Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Cc: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Tested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t7008-grep-binary.sh: un-TODO a test that needs REG_S... Ævar Arnfjörð Bjarmason Tue, 17 Aug 2010 09:24:41 +0000 (09:24 +0000)

t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND

Now that we have a regex engine that supports REG_STARTEND this test
should fail if "git grep" can't grep NULL characters.

Platforms that don't have a POSIX regex engine which supports
REG_STARTEND should always define NO_REGEX=YesPlease when compiling.

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

compat/regex: get rid of old-style definitionJunio C Hamano Thu, 19 Aug 2010 22:31:30 +0000 (15:31 -0700)

compat/regex: get rid of old-style definition

These files mostly used ANSI style function definitions, but with small
number of old-style ones. Convert them to consistently use ANSI style.

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

t/t9010-svn-fe.sh: add an +x bit to this testÆvar Arnfjörð Bjarmason Thu, 19 Aug 2010 15:53:50 +0000 (15:53 +0000)

t/t9010-svn-fe.sh: add an +x bit to this test

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

compat/regex: define out variables only used under... Ævar Arnfjörð Bjarmason Thu, 19 Aug 2010 18:30:01 +0000 (18:30 +0000)

compat/regex: define out variables only used under RE_ENABLE_I18N

Wrap variables that were only used RE_ENABLE_I18N in `#ifdef
RE_ENABLE_I18N`. This eliminates compiler warnings when compiling with
NO_REGEX=YesPlease.

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

t9155: fix compatibility with older SVNEric Wong Thu, 19 Aug 2010 19:03:18 +0000 (12:03 -0700)

t9155: fix compatibility with older SVN

The "--parents" option did not appear until SVN 1.5.x
and is completely unnecessary in this case.

Reported-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

Merge branch 'sp/fix-smart-http-deadlock-on-error'... Junio C Hamano Wed, 18 Aug 2010 23:30:11 +0000 (16:30 -0700)

Merge branch 'sp/fix-smart-http-deadlock-on-error' into maint

* sp/fix-smart-http-deadlock-on-error:
smart-http: Don't deadlock on server failure

git-gui: ensure correct application termination in... Pat Thoyts Wed, 18 Aug 2010 22:19:24 +0000 (23:19 +0100)

git-gui: ensure correct application termination in git-gui--askpass

With Tk 8.5 the askpass utility can hang waiting for the wish shell
implicit event loop to exit. This patch uses an explicit event loop
to ensure correct application termination.

Reported-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Change regerror() declaration from K&R style to ANSI... Frank Li Tue, 17 Aug 2010 09:24:40 +0000 (09:24 +0000)

Change regerror() declaration from K&R style to ANSI C (C89)

The MSVC headers typedef errcode as int, and thus confused the compiler in
the K&R style definition. ANSI style deconfuses it.

This patch was originally applied as v1.6.5-rc2~23 but needs to be
re-applied since compat/regex was overwritten by Ævar Arnfjörð
Bjarmason with the gawk regex engine.

Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

compat/regex: get the gawk regex engine to compile... Ævar Arnfjörð Bjarmason Tue, 17 Aug 2010 09:24:39 +0000 (09:24 +0000)

compat/regex: get the gawk regex engine to compile within git

We need to define -DGAWK -DNO_MBSUPPORT so that the gawk regex engine
will compile, and include stdio.h and stddef.h in regex.h. Gawk itself
includes these headers before it includes the regex.h header.

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

compat/regex: use the regex engine from gawk for compatÆvar Arnfjörð Bjarmason Tue, 17 Aug 2010 09:24:38 +0000 (09:24 +0000)

compat/regex: use the regex engine from gawk for compat

Change the regex engine in compat to use the gawk engine from the
gawk-devel module in gawk CVS. This engine supports the REG_STARTEND
flag, which was optionally available in Git since v1.7.2-rc0~77^2~1.

The source was grabbed from cvs.savannah.gnu.org:/sources/gawk, and
these are the upstream versions of the files being included:

regcomp.c 1.4
regex.h 1.3
regex.h 1.3
regex_internal.c 1.3
regex_internal.h 1.3
regexec.c 1.3

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

merge script: learn --[no-]rerere-autoupdateJonathan Nieder Tue, 17 Aug 2010 07:13:40 +0000 (02:13 -0500)

merge script: learn --[no-]rerere-autoupdate

Port v1.7.0-rc0~83^2 (Teach --[no-]rerere-autoupdate option to
merge, revert and friends, 2009-12-04) to the example merge script.

After this change, all tests pass for me with the scripted
merge.

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

merge script: notice @{-1} shorthandJonathan Nieder Tue, 17 Aug 2010 07:11:30 +0000 (02:11 -0500)

merge script: notice @{-1} shorthand

Port v1.6.2-rc1~10^2 (Teach @{-1} to git merge, 2009-02-13) to
the old merge script.

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

merge script: handle --no-ff --no-commit correctlyJonathan Nieder Tue, 17 Aug 2010 07:11:03 +0000 (02:11 -0500)

merge script: handle --no-ff --no-commit correctly

In a --no-ff merge with conflicts, "git commit" used to forget the
--no-ff when used to complete the merge. That was fixed by
v1.6.1-rc1~134^2 (builtin-commit: use reduce_heads() only when
appropriate, 2008-10-03) for the builtin merge. Port the change to
the merge script in contrib/examples.

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

merge script: --ff-only to disallow true mergeJonathan Nieder Tue, 17 Aug 2010 07:10:17 +0000 (02:10 -0500)

merge script: --ff-only to disallow true merge

Port v1.6.6-rc0~62^2 (Teach 'git merge' and 'git pull' the option
--ff-only, 2009-10-29) to the old merge script.

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

merge script: handle many-way octopusJonathan Nieder Tue, 17 Aug 2010 07:09:58 +0000 (02:09 -0500)

merge script: handle many-way octopus

Based on v1.6.0-rc0~51^2~5 (Build in merge, 2008-07-07).

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

merge script: handle -m --log correctlyJonathan Nieder Tue, 17 Aug 2010 07:06:56 +0000 (02:06 -0500)

merge script: handle -m --log correctly

Based on v1.7.1.1~23^2 (merge: --log appends shortlog to message if
specified, 2010-05-11). Without this change, the scripted
(non-builtin) merge does not pass t7604.

Cc: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge script: forbid merge -s indexJonathan Nieder Tue, 17 Aug 2010 07:06:06 +0000 (02:06 -0500)

merge script: forbid merge -s index

Some git-merge-* commands are not merge strategies. This is based on
v1.6.1-rc1~294^2~7 (builtin-merge: allow using a custom strategy,
2008-07-30) but it is less smart: we just use a hard-coded list of
forbidden strategy names. It is okay if this falls out of date, since
the code is just an example.

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

merge script: allow custom strategiesJonathan Nieder Tue, 17 Aug 2010 07:05:32 +0000 (02:05 -0500)

merge script: allow custom strategies

The idea comes from v1.6.1-rc1~294^2~7 (builtin-merge: allow using a
custom strategy, 2008-07-30).

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

merge script: merge -X<option>Jonathan Nieder Tue, 17 Aug 2010 07:05:10 +0000 (02:05 -0500)

merge script: merge -X<option>

Without this support, the scripted merge cannot pass t6037.

Based on v1.7.0-rc0~55^2~5 (git merge -X<option>, 2009-11-25).

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

merge script: improve log message subjectJonathan Nieder Tue, 17 Aug 2010 07:04:43 +0000 (02:04 -0500)

merge script: improve log message subject

- point out remote-tracking branches as "remote branch
'upstream/master'";
- avoid misleading log messages when a tag and branch
share a name.

This approximates the builtin merge command's behavior well
enough to pass the relevant tests.

Based roughly on v1.6.4.2~10^2 (merge: indicate remote tracking
branches in merge message, 2009-08-09) and v1.6.4.2~10^2~1 (merge: fix
incorrect merge message for ambiguous tag/branch, 2009-08-09).

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