gitweb.git
Merge branch 'rs/maint-grep-word-regexp-fix' into maintJunio C Hamano Tue, 2 Jun 2009 14:48:09 +0000 (07:48 -0700)

Merge branch 'rs/maint-grep-word-regexp-fix' into maint

* rs/maint-grep-word-regexp-fix:
grep: fix colouring of matches with zero length
grep: fix word-regexp at the beginning of lines

Merge branch 'sb/maint-1.6.2-opt-filename-fix' into... Junio C Hamano Tue, 2 Jun 2009 14:47:03 +0000 (07:47 -0700)

Merge branch 'sb/maint-1.6.2-opt-filename-fix' into maint

* sb/maint-1.6.2-opt-filename-fix:
apply, fmt-merge-msg: use relative filenames
commit: -F overrides -t

Merge branch 'jc/maint-add-p-coalesce-fix' into maintJunio C Hamano Tue, 2 Jun 2009 14:46:52 +0000 (07:46 -0700)

Merge branch 'jc/maint-add-p-coalesce-fix' into maint

* jc/maint-add-p-coalesce-fix:
t3701: ensure correctly set up repository after skipped tests
Revert "git-add--interactive: remove hunk coalescing"
Splitting a hunk that adds a line at the top fails in "add -p"

Merge branch 'tr/maint-doc-stash-pop' into maintJunio C Hamano Tue, 2 Jun 2009 14:43:45 +0000 (07:43 -0700)

Merge branch 'tr/maint-doc-stash-pop' into maint

* tr/maint-doc-stash-pop:
Documentation: teach stash/pop workflow instead of stash/apply

test-lib: fix http exit codesClemens Buchacher Mon, 1 Jun 2009 12:28:25 +0000 (14:28 +0200)

test-lib: fix http exit codes

Previously, die() would report the exit code of stop_httpd. Instead,
save and reset the exit code before dying.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: allow exit trap to be used for cleanup by... Clemens Buchacher Mon, 1 Jun 2009 12:14:41 +0000 (14:14 +0200)

test-lib: allow exit trap to be used for cleanup by tests

Exit trap should not be removed in case tests require cleanup code. This
is especially important if tests are executed with the --immediate option.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: fail if invalid options are passedClemens Buchacher Mon, 1 Jun 2009 12:14:40 +0000 (14:14 +0200)

test-lib: fail if invalid options are passed

Previously, unknown options would be ignored, including any subsequent
valid options.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep: fix colouring of matches with zero lengthRené Scharfe Mon, 1 Jun 2009 21:53:05 +0000 (23:53 +0200)

grep: fix colouring of matches with zero length

If a zero-length match is encountered, break out of loop and show the rest
of the line uncoloured. Otherwise we'd be looping forever, trying to make
progress by advancing the pointer by zero characters.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refuse to merge during a mergeClemens Buchacher Mon, 1 Jun 2009 09:20:56 +0000 (11:20 +0200)

refuse to merge during a merge

The following is an easy mistake to make for users coming from version
control systems with an "update and commit"-style workflow.

1. git pull
2. resolve conflicts
3. git pull

Step 3 overrides MERGE_HEAD, starting a new merge with dirty index.
IOW, probably not what the user intended. Instead, refuse to merge
again if a merge is in progress.

Reported-by: Dave Olszewski <cxreg@pobox.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

match_refs: search ref list tail internallyClemens Buchacher Sun, 31 May 2009 14:26:48 +0000 (16:26 +0200)

match_refs: search ref list tail internally

Avoid code duplication by moving list tail search to match_refs().

This does not change the semantics, except for http-push, which now inserts
to the front of the ref list in order to get rid of the global remote_tail.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-show-branch.txt: document --date-order optionStephen Boyd Mon, 1 Jun 2009 06:34:46 +0000 (23:34 -0700)

git-show-branch.txt: document --date-order option

Copy the description of date-order from rev-list-options.txt, and then
reword it to be commit specific. While we're at it, put <rev> <glob>...
on a new line to not exceed 80 characters.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add custom memory allocator to MinGW and MacOS buildsMarius Storm-Olsen Sun, 31 May 2009 16:15:23 +0000 (18:15 +0200)

Add custom memory allocator to MinGW and MacOS builds

The standard allocator on Windows is pretty bad prior
to Windows Vista, and nedmalloc is better than the
modified dlmalloc provided with newer versions of the
MinGW libc.

NedMalloc stats in Git
----------------------
All results are the best result out of 3 runs. The
benchmarks have been done on different hardware, so
the repack times are not comparable.

These benchmarks are all based on 'git repack -adf'
on the Linux kernel.

XP
-----------------------------------------------
MinGW Threads Total Time Speed
-----------------------------------------------
3.4.2 (1T) 00:12:28.422
3.4.2 + nedmalloc (1T) 00:07:25.437 1.68x

3.4.5 (1T) 00:12:20.718
3.4.5 + nedmalloc (1T) 00:07:24.809 1.67x

4.3.3-tdm (1T) 00:12:01.843
4.3.3-tdm + nedmalloc (1T) 00:07:16.468 1.65x

4.3.3-tdm (2T) 00:07:35.062
4.3.3-tdm + nedmalloc (2T) 00:04:57.874 1.54x

Vista
-----------------------------------------------
MinGW Threads Total Time Speed
-----------------------------------------------
4.3.3-tdm (1T) 00:07:40.844
4.3.3-tdm + nedmalloc (1T) 00:07:17.548 1.05x

4.3.3-tdm (2T) 00:05:33.746
4.3.3-tdm + nedmalloc (2T) 00:05:27.334 1.02x

Mac Mini
-----------------------------------------------
GCC Threads Total Time Speed
-----------------------------------------------
i686-darwin9-4.0.1 (2T) 00:09:57.346
i686-darwin9-4.0.1+ned (2T) 00:08:51.072 1.12x

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

MinGW readdir reimplementation to support d_typeMarius Storm-Olsen Sun, 31 May 2009 16:15:22 +0000 (18:15 +0200)

MinGW readdir reimplementation to support d_type

The original readdir implementation was fast, but didn't
support the d_type. This means that git would do additional
lstats for each entry, to figure out if the entry was a
directory or not. This unneedingly slowed down many
operations, since Windows API provides this information
directly when walking the directories.

By running this implementation on Moe's repo structure:
mkdir bummer && cd bummer; for ((i=0;i<100;i++)); do
mkdir $i && pushd $i;
for ((j=0;j<1000;j++)); do echo "$j" >$j; done;
popd;
done

We see the following speedups:
git add .
-------------------
old: 00:00:23(.087)
new: 00:00:21(.512) 1.07x

git status
-------------------
old: 00:00:03(.306)
new: 00:00:01(.684) 1.96x

git clean -dxf
-------------------
old: 00:00:01(.918)
new: 00:00:00(.295) 6.50x

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect.c: Support PuTTY plink and TortoisePlink as... Edward Z. Yang Sun, 31 May 2009 16:15:21 +0000 (18:15 +0200)

connect.c: Support PuTTY plink and TortoisePlink as SSH on Windows

OpenSSH uses -p to specify custom ports, while PuTTY plink and
TortoisePlink use -P. Git now detects if plink is in GIT_SSH and
modify its flags as necessary.

We call plink with -batch, so that it will error out with an error
message instead of waiting for user input. As reported in msysGit
issue 96, plink wants to interact with the user asking if a host
key should be accepted, but this just blocks the terminal, since
plink tries to get the answer from stdin. However, stdin is
already connected to Git that wants to send input to the remote
command.

But we do not pass -batch to TortoisePlink, because TortoisePlink
uses a GUI to communicate with the user, and it does not understand
-batch.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git: browsing paths with spaces when using the start... Pat Thoyts Sun, 31 May 2009 16:15:20 +0000 (18:15 +0200)

git: browsing paths with spaces when using the start command

msysGit issue 258 tracks a problem opening a browser onto file
paths that contain spaces or parentheses when calling the
web--browse script. This patch modifies how the start command is
called to solve this.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

MinGW: fix warning about implicit declaration of _getch()Johannes Schindelin Mon, 1 Jun 2009 06:41:45 +0000 (08:41 +0200)

MinGW: fix warning about implicit declaration of _getch()

conio.h provides the declaration.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-chmtime: work around Windows limitationJohannes Schindelin Sun, 31 May 2009 16:15:18 +0000 (18:15 +0200)

test-chmtime: work around Windows limitation

Windows has problems changing the mtime when the file is write protected,
even by the owner of said file.

Add a Windows-only workaround to change the mode if necessary before
trying to change the mtime.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Work around a regression in Windows 7, causing erase_in... Johannes Schindelin Mon, 1 Jun 2009 06:04:16 +0000 (08:04 +0200)

Work around a regression in Windows 7, causing erase_in_line() to crash sometimes

The function FillConsoleOutputCharacterA() was pretty content in XP to take a NULL
pointer if we did not want to store the number of written columns. In Windows 7,
it crashes, but only when called from within Git Bash, not from within cmd.exe.
Go figure.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Quiet make: do not leave Windows behindJohannes Schindelin Sun, 31 May 2009 16:15:16 +0000 (18:15 +0200)

Quiet make: do not leave Windows behind

On Windows, we have to check whether there are scripts which would
override .exe files, but this check missed the "quietification".
Make now prints 'BUILTIN all' instead of a long chain of 'test || rm'
commands.

[spr: added clarification what make will print. ]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymoreJohannes Schindelin Sun, 31 May 2009 16:15:15 +0000 (18:15 +0200)

MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: generate pretty filenames in prep_temp_blob()David Aguilar Sun, 31 May 2009 08:35:52 +0000 (01:35 -0700)

diff: generate pretty filenames in prep_temp_blob()

Naturally, prep_temp_blob() did not care about filenames.
As a result, GIT_EXTERNAL_DIFF and textconv generated
filenames such as ".diff_XXXXXX".

This modifies prep_temp_blob() to generate user-friendly
filenames when creating temporary files.

Diffing "name.ext" now generates "XXXXXX_name.ext".

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

compat: add a basename() compatibility functionDavid Aguilar Sun, 31 May 2009 08:35:51 +0000 (01:35 -0700)

compat: add a basename() compatibility function

Some systems such as Windows lack libgen.h so provide a
basename() implementation for cross-platform use.

This introduces the NO_LIBGEN_H construct to the Makefile
and autoconf scripts.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

compat: add a mkstemps() compatibility functionDavid Aguilar Sun, 31 May 2009 08:35:50 +0000 (01:35 -0700)

compat: add a mkstemps() compatibility function

mkstemps() is a BSD extension so provide an implementation
for cross-platform use.

Signed-off-by: David Aguilar <davvid@gmail.com>
Tested-by: Johannes Sixt <j6t@kdbg.org> (Windows)
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6050: check pushing something based on a replaced... Christian Couder Wed, 27 May 2009 05:14:09 +0000 (07:14 +0200)

t6050: check pushing something based on a replaced commit

When using something like:

$ git push $there 04a8c^2:master

we need to parse 04a8c to find its second parent and then start
discussing what object to send with the other end. "04a8c^2" is a direct
user input and should mean the same commit as git show "04a8c^2" would
give the user, so it obviously needs to obey the replace rules (making
04a8c parsed), but the object transfer should not look at replace at all.

This patch adds some tests to check that the above is working well.

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

Documentation: add documentation for "git replace"Christian Couder Mon, 13 Apr 2009 22:36:59 +0000 (00:36 +0200)

Documentation: add documentation for "git replace"

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

Add git-replace to .gitignoreDavid Aguilar Tue, 14 Apr 2009 02:01:27 +0000 (19:01 -0700)

Add git-replace to .gitignore

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-replace: use "usage_msg_opt" to give better... Christian Couder Mon, 2 Feb 2009 05:13:06 +0000 (06:13 +0100)

builtin-replace: use "usage_msg_opt" to give better error messages

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

parse-options: add new function "usage_msg_opt"Christian Couder Mon, 2 Feb 2009 05:12:58 +0000 (06:12 +0100)

parse-options: add new function "usage_msg_opt"

This function can be used instead of "usage_with_options" when you
want to print an error message before the usage string.

It may be useful because:

if (condition)
usage_msg_opt("condition is false", usage, opts);

is shorter than:

if (condition) {
fprintf(stderr, "condition is false\n\n");
usage_with_options(usage, opts);
}

and may be more consistent.

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

builtin-replace: teach "git replace" to actually replaceChristian Couder Mon, 2 Feb 2009 05:12:53 +0000 (06:12 +0100)

builtin-replace: teach "git replace" to actually replace

Teach the syntax: "git replace <object> <replacement>", so that
"git replace" can now create replace refs. These replace refs
will be used by read_sha1_file to substitute <object> with
<replacement> for most of the commands.

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

Add new "git replace" commandChristian Couder Mon, 2 Feb 2009 05:12:44 +0000 (06:12 +0100)

Add new "git replace" command

This command can only be used now to list replace refs in
"refs/replace/" and to delete them.

The option to list replace refs is "-l".
The option to delete replace refs is "-d".

The behavior should be consistent with how "git tag" and "git branch"
are working.

The code has been copied from "builtin-tag.c" by Kristian Høgsberg
<krh@redhat.com> and Carlos Rica <jasampler@gmail.com> that was itself
based on git-tag.sh and mktag.c by Linus Torvalds.

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

environment: add global variable to disable replacementChristian Couder Fri, 23 Jan 2009 09:07:46 +0000 (10:07 +0100)

environment: add global variable to disable replacement

This new "read_replace_refs" global variable is set to 1 by
default, so that replace refs are used by default. But
reachability traversal and packing commands ("cmd_fsck",
"cmd_prune", "cmd_pack_objects", "upload_pack",
"cmd_unpack_objects") set it to 0, as they must work with the
original DAG.

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

mktag: call "check_sha1_signature" with the replacement... Christian Couder Fri, 23 Jan 2009 09:07:26 +0000 (10:07 +0100)

mktag: call "check_sha1_signature" with the replacement sha1

Otherwise we get a "sha1 mismatch" error for replaced objects.

Note that I am not sure at all that this is a good change.
It may be that we should just refuse to tag a replaced object. But
in this case we should probably give a meaningfull error message
instead of "sha1 mismatch".

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

replace_object: add a test caseChristian Couder Fri, 23 Jan 2009 09:07:18 +0000 (10:07 +0100)

replace_object: add a test case

In this patch the setup code is very big, but this will be used in
test cases that will be added later.

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

object: call "check_sha1_signature" with the replacemen... Christian Couder Fri, 23 Jan 2009 09:07:10 +0000 (10:07 +0100)

object: call "check_sha1_signature" with the replacement sha1

Otherwise we get a "sha1 mismatch" error for replaced objects.

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

sha1_file: add a "read_sha1_file_repl" functionChristian Couder Fri, 23 Jan 2009 09:07:01 +0000 (10:07 +0100)

sha1_file: add a "read_sha1_file_repl" function

This new function will replace "read_sha1_file". This latter function
becoming just a stub to call the former will a NULL "replacement"
argument.

This new function is needed because sometimes we need to use the
replacement sha1.

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

replace_object: add mechanism to replace objects found... Christian Couder Fri, 23 Jan 2009 09:06:53 +0000 (10:06 +0100)

replace_object: add mechanism to replace objects found in "refs/replace/"

The code implementing this mechanism has been copied more-or-less
from the commit graft code.

This mechanism is used in "read_sha1_file". sha1 passed to this
function that match a ref name in "refs/replace/" are replaced by
the sha1 that has been read in the ref.

We "die" if the replacement recursion depth is too high or if we
can't read the replacement object.

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

refs: add a "for_each_replace_ref" functionChristian Couder Fri, 23 Jan 2009 09:06:38 +0000 (10:06 +0100)

refs: add a "for_each_replace_ref" function

This is some preparation work for the following patches that are using
the "refs/replace/" ref namespace.

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

Merge branch 'sb/opt-filename'Junio C Hamano Sun, 31 May 2009 23:57:42 +0000 (16:57 -0700)

Merge branch 'sb/opt-filename'

* sb/opt-filename:
parse-opts: add OPT_FILENAME and transition builtins
parse-opts: prepare for OPT_FILENAME

Conflicts:
builtin-log.c

Merge branch 'jc/solaris-0811'Junio C Hamano Sun, 31 May 2009 23:18:02 +0000 (16:18 -0700)

Merge branch 'jc/solaris-0811'

* jc/solaris-0811:
OpenSolaris 200811 (SunOS 5.11) does not want OLD_ICONV
Teach Solaris that _XOPEN_SOURCE=600 really menas XPG6

Merge branch 'sb/show-branch-parse-options'Junio C Hamano Sun, 31 May 2009 23:17:58 +0000 (16:17 -0700)

Merge branch 'sb/show-branch-parse-options'

* sb/show-branch-parse-options:
show-branch: migrate to parse-options API
parse-options: add PARSE_OPT_LITERAL_ARGHELP for complicated argh's

Conflicts:
parse-options.h

Merge branch 'mm/apply-double-slash'Junio C Hamano Sun, 31 May 2009 23:17:46 +0000 (16:17 -0700)

Merge branch 'mm/apply-double-slash'

* mm/apply-double-slash:
apply: handle filenames with double slashes better

Merge branch 'sb/format-patch-parseopt'Junio C Hamano Sun, 31 May 2009 23:17:31 +0000 (16:17 -0700)

Merge branch 'sb/format-patch-parseopt'

* sb/format-patch-parseopt:
format-patch: migrate to parse-options API

Conflicts:
builtin-log.c

Merge branch 'jc/mktree'Junio C Hamano Sun, 31 May 2009 23:17:11 +0000 (16:17 -0700)

Merge branch 'jc/mktree'

* jc/mktree:
mktree: validate entry type in input
mktree --batch: build more than one tree object
mktree --missing: updated usage message and man page
mktree --missing: allow missing objects
t1010: add mktree test
mktree: do not barf on a submodule commit
builtin-mktree.c: use a helper function to handle one line of input
mktree: use parse-options
build-in git-mktree

Merge branch 'ew/svn-test-and-old-i18n'Junio C Hamano Sun, 31 May 2009 23:17:07 +0000 (16:17 -0700)

Merge branch 'ew/svn-test-and-old-i18n'

* ew/svn-test-and-old-i18n:
t8005: fix typo, it's ISO-8859-5, not KOI8-R
t8005: convert CP1251 character set to ISO8859-5
t8005: use more portable character encoding names
t5100: use ancient encoding syntax for backwards compatibility
t9301: use ISO8859-1 rather than ISO-8859-1
t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility
t3901: avoid negation on right hand side of '|'
builtin-mailinfo.c: use "ISO8859-1" instead of "latin1" as fallback encoding
builtin-mailinfo.c: compare character encodings case insensitively
Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility
t3900: use ancient iconv names for backward compatibility

Merge branch 'mw/send-email'Junio C Hamano Sun, 31 May 2009 23:16:52 +0000 (16:16 -0700)

Merge branch 'mw/send-email'

* mw/send-email:
send-email: Remove superfluous `my $editor = ...'
send-email: 'References:' should only reference what is sent
send-email: Handle "GIT:" rather than "GIT: " during --compose
Docs: send-email: --smtp-server-port can take symbolic ports
Docs: send-email: Refer to CONFIGURATION section for sendemail.multiedit
Docs: send-email: Put options back into alphabetical order

Merge branch 'cc/bisect' (early part)Junio C Hamano Sun, 31 May 2009 23:16:48 +0000 (16:16 -0700)

Merge branch 'cc/bisect' (early part)

* 'cc/bisect' (early part):
bisect: check ancestors without forking a "git rev-list" process
commit: add function to unparse a commit and its parents
bisect: rework some rev related functions to make them more reusable

git-add: no need for -f when resolving a conflict in... Jeff King Sat, 30 May 2009 21:54:18 +0000 (17:54 -0400)

git-add: no need for -f when resolving a conflict in already tracked path

When a path F that matches ignore pattern has a conflict, "git add F"
insisted the -f option be given, which did not make sense. It would have
required -f when the path was originally added, but when resolving a
conflict, it already is tracked.

So this should work (and does):

$ echo file >.gitignore
$ echo content >file
$ git add -f file ;# need -f because we are adding new path
$ echo more content >>file
$ git add file ;# don't need -f; it is not actually an "other" file

This is handled under the hood by the COLLECT_IGNORED option to
read_directory. When that code finds an ignored file, it checks the
index to make sure it is not actually a tracked file. However, the test
it uses does not take into account unmerged entries, and considers them
to still be ignored. "git ls-files" uses a more elaborate test and gets
the right answer and the same test should be used here.

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

config.txt: document add.ignore-errorsStephen Boyd Sun, 31 May 2009 05:08:02 +0000 (22:08 -0700)

config.txt: document add.ignore-errors

Use the description of "--ignore-errors" from git-add.txt as
inspiration.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash: remove always true if statement from __git_ps1()SZEDER Gábor Fri, 29 May 2009 12:00:36 +0000 (14:00 +0200)

bash: remove always true if statement from __git_ps1()

The recent commits 8763dbb1 (completion: fix PS1 display during a
merge on detached HEAD, 2009-05-16), ff790b6a (completion: simplify
"current branch" in __git_ps1(), 2009-05-10), and d7107ca6
(completion: fix PS1 display during an AM on detached HEAD,
2009-05-26) ensure that the branch name in __git_ps1() is always set
to something sensible. Therefore, the condition for checking the
non-empty branch name is always fulfilled, and can be removed.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-apply(1): Clarify that one can select where to... Björn Steinbrink Fri, 29 May 2009 10:21:24 +0000 (12:21 +0200)

git-apply(1): Clarify that one can select where to apply the patch

The patch can be applied to the work tree, the index or both, but the
short description made it look like it's always applied to both.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-push: reuse existing is_null_refClemens Buchacher Sun, 31 May 2009 10:36:10 +0000 (12:36 +0200)

http-push: reuse existing is_null_ref

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9139 uses ancient, backwards-compatible iconv namesEric Wong Sat, 30 May 2009 00:14:47 +0000 (17:14 -0700)

t9139 uses ancient, backwards-compatible iconv names

This resolves a semantic conflicts early to work with 5ae93df (t3900: use
ancient iconv names for backward compatibility, 2009-05-18).

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.bogomips.org/git-svnJunio C Hamano Sun, 31 May 2009 05:25:41 +0000 (22:25 -0700)

Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
git-svn: refuse to dcommit non-UTF-8 messages

Documentation: teach stash/pop workflow instead of... Thomas Rast Thu, 28 May 2009 09:40:15 +0000 (11:40 +0200)

Documentation: teach stash/pop workflow instead of stash/apply

Recent discussion on the list showed some comments in favour of a
stash/pop workflow:

http://marc.info/?l=git&m=124234911423358&w=2
http://marc.info/?l=git&m=124235348327711&w=2

Change the stash documentation and examples to document pop in its own
right (and apply in terms of pop), and use stash/pop in the examples.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'sb/maint-1.6.2-opt-filename-fix'Junio C Hamano Fri, 29 May 2009 22:01:16 +0000 (15:01 -0700)

Merge branch 'sb/maint-1.6.2-opt-filename-fix'

* sb/maint-1.6.2-opt-filename-fix:
apply, fmt-merge-msg: use relative filenames
commit: -F overrides -t

Merge branch 'jc/maint-add-p-coalesce-fix'Junio C Hamano Fri, 29 May 2009 22:00:15 +0000 (15:00 -0700)

Merge branch 'jc/maint-add-p-coalesce-fix'

* jc/maint-add-p-coalesce-fix:
t3701: ensure correctly set up repository after skipped tests
Revert "git-add--interactive: remove hunk coalescing"
Splitting a hunk that adds a line at the top fails in "add -p"

Merge branch 'rs/maint-grep-word-regexp-fix'Junio C Hamano Fri, 29 May 2009 21:59:50 +0000 (14:59 -0700)

Merge branch 'rs/maint-grep-word-regexp-fix'

* rs/maint-grep-word-regexp-fix:
grep: fix word-regexp at the beginning of lines

t9120: don't expect failure with SVN_HTTPD_PORT unsetStephen Boyd Tue, 26 May 2009 06:15:47 +0000 (23:15 -0700)

t9120: don't expect failure with SVN_HTTPD_PORT unset

The test still passes when SVN_HTTPD_PORT is not set. Futhermore, t9115
and t9118 don't check if SVN_HTTPD_PORT is set even though they both use
start_httpd() from lib-git-svn.sh. Admittedly, the test is not very
meaningful without SVN_HTTPD_PORT, as commit f5530b (support for funky
branch and project names over HTTP(S) 2007-11-11) states that the URI
escaping is only done over HTTP(S).

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

for-each-ref: Do not lookup objects when they will... Anders Kaseorg Wed, 27 May 2009 19:23:12 +0000 (15:23 -0400)

for-each-ref: Do not lookup objects when they will not be used

This makes commands such as `git for-each-ref --format='%(refname)'`,
which are used heavily by the bash_completion code, run about 6 times
faster on an uncached repository (3 s intead of 18 s on my linux-2.6
repository with several remotes).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: use /usr/ucb/install on SunOS platforms rathe... Brandon Casey Thu, 28 May 2009 02:17:05 +0000 (21:17 -0500)

Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall

We can avoid a GNU dependency by using /usr/ucb/install.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: teach stash/pop workflow instead of... Thomas Rast Thu, 28 May 2009 09:40:15 +0000 (11:40 +0200)

Documentation: teach stash/pop workflow instead of stash/apply

Recent discussion on the list showed some comments in favour of a
stash/pop workflow:

http://marc.info/?l=git&m=124234911423358&w=2
http://marc.info/?l=git&m=124235348327711&w=2

Change the stash documentation and examples to document pop in its own
right (and apply in terms of pop), and use stash/pop in the examples.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cvsexportcommit can't commit files which have been... Nick Woolley Thu, 28 May 2009 23:23:33 +0000 (00:23 +0100)

git-cvsexportcommit can't commit files which have been removed from CVS

If a file X is removed from CVS, it goes into the Attic directory, and CVS
reports it as 'no file X' but with status 'Up-to-date'. cvsexportcommit
misinterprets this as an existing file and tries to commit a file with the
same name. Correctly identify these files, so that new files with the
same name can be committed.

Add a test to t9200-git-cvsexportcommit.sh, which tests that we can
re-commit a removed filename which remains in CVS's attic. This adds a
file 'attic_gremlin' in CVS, then "removes" it, then tries to commit a
file with the same name from git.

Signed-off-by: Nick Woolley <git.wu-lee@noodlefactory.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am foreign patch support: StGIT supportGiuseppe Bilotta Wed, 27 May 2009 09:25:18 +0000 (11:25 +0200)

git-am foreign patch support: StGIT support

Support StGIT patches by implementing a simple perl-based converter
mimicking StGIT's own parse_patch. Also support StGIT patch series by
'exploding' the index into a list of files and re-running the mail
splitting with patch_format set to stgit.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am foreign patch support: autodetect some patch... Giuseppe Bilotta Wed, 27 May 2009 21:20:12 +0000 (23:20 +0200)

git-am foreign patch support: autodetect some patch formats

Default to mbox format if input is from stdin. Otherwise, look at the
first few lines of the first patch to try to guess its format.

Include checks for mailboxes, stgit patch series, stgit single patches
and hg patches.

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

git-am foreign patch support: introduce patch_formatGiuseppe Bilotta Wed, 27 May 2009 09:25:16 +0000 (11:25 +0200)

git-am foreign patch support: introduce patch_format

Set up a framework to allow git-am to support patches which are not in
mailbox format. Introduce a patch_format variable that presently can
only be set from the command line, defaulting to 'mbox' (the only
supported format) if not specified.

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

Merge branch 'maint'Junio C Hamano Fri, 29 May 2009 05:50:23 +0000 (22:50 -0700)

Merge branch 'maint'

* maint:
fix segfault showing an empty remote

bisect: display first bad commit without forking a... Christian Couder Thu, 28 May 2009 21:21:16 +0000 (23:21 +0200)

bisect: display first bad commit without forking a new process

Previously "git diff-tree --pretty COMMIT" was run using
"run_command_v_opt" to display information about the first bad
commit.

The goal of this patch is to avoid a "fork" and an "exec" call
when displaying that information.

To do that, we manually setup revision information as
"git diff-tree --pretty" would do it, and then use the
"log_tree_commit" function.

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

git-svn: refuse to dcommit non-UTF-8 messagesEric Wong Thu, 28 May 2009 07:56:23 +0000 (00:56 -0700)

git-svn: refuse to dcommit non-UTF-8 messages

...without i18n.commitencoding set in the config.

SVN tries to store all commit messages in UTF-8, however it is
up to the job of the clients to enforce this rule. SVN servers
themselves do not always enforce this; allowing clients to
commit malformed UTF-8 messages and break repositories.

So git-svn will enforce this and tell the user to set
i18n.commitencoding when a git commit is is not in UTF-8.

Signed-off-by: Eric Wong <normalperson@yhbt.net>

fix segfault showing an empty remoteClemens Buchacher Wed, 27 May 2009 20:13:43 +0000 (22:13 +0200)

fix segfault showing an empty remote

In case of an empty list, the search for its tail caused a
NULL-pointer dereference.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Reported-by: Erik Faye-Lund <kusmabite@googlemail.com>
Acked-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t8005: fix typo, it's ISO-8859-5, not KOI8-RBrandon Casey Thu, 28 May 2009 01:57:45 +0000 (20:57 -0500)

t8005: fix typo, it's ISO-8859-5, not KOI8-R

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: drop unparse_commit() and use clear_commit_marks()Christian Couder Wed, 27 May 2009 05:09:40 +0000 (07:09 +0200)

bisect: drop unparse_commit() and use clear_commit_marks()

The goal of this patch series is to check if good revisions are
ancestor of the bad revision without forking a process to launch
"git rev-list $good ^$bad".

This new version of this patch series does not use an "unparse_commit"
function anymore, we use "clear_commit_marks" instead.

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

t5500: Modernize test styleStephen Boyd Tue, 26 May 2009 06:17:14 +0000 (23:17 -0700)

t5500: Modernize test style

Code outside of the test harness was emitting "Initializing..." from
git-init. Fixup this test to be more modern:

- test_expect_object_count() and count_objects() are unused

- use grep directly instead of test "..." = $(grep ...)

- end the test_expect_success line with a single-quote and put the
test on a new line

- put as much code inside the test harness as possible

- no_strict_count_check is unused and duplicates the test
"new object count"

- use && whenever possible to catch errors early

- use test_tick instead of GIT_AUTHOR_DATE=$sec

- remove debugging aid log.txt

- use subshells instead of cd-ing around

Also merge the pull test into one large test.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: fix PS1 display during an AM on detached... Junio C Hamano Tue, 26 May 2009 05:56:03 +0000 (22:56 -0700)

completion: fix PS1 display during an AM on detached HEAD

This is a companion patch to previous 8763dbb (completion: fix PS1 display
during a merge on detached HEAD, 2009-05-16). While rebasing or running am
on a detached HEAD, the code failed to set $b (branch description) that
enables the whole status display business.

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

imap-send: add support for IPv6Benjamin Kramer Mon, 25 May 2009 19:13:54 +0000 (21:13 +0200)

imap-send: add support for IPv6

Add IPv6 support by implementing name resolution with the
protocol agnostic getaddrinfo(3) API. The old gethostbyname(3)
code is still available when git is compiled with NO_IPV6.

Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.6.4Junio C Hamano Tue, 26 May 2009 02:46:17 +0000 (19:46 -0700)

Update draft release notes to 1.6.4

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

Merge branch 'maint'Junio C Hamano Tue, 26 May 2009 02:44:52 +0000 (19:44 -0700)

Merge branch 'maint'

* maint:
Prepare for 1.6.3.2
fix cat-file usage message and documentation
fetch: report ref storage DF errors more accurately
lock_ref: inform callers of unavailable ref
merge-options.txt: Clarify merge --squash

Conflicts:
RelNotes

Prepare for 1.6.3.2Junio C Hamano Tue, 26 May 2009 02:20:39 +0000 (19:20 -0700)

Prepare for 1.6.3.2

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

Merge branch 'js/maint-no-ln-across-libexec-and-bin... Junio C Hamano Tue, 26 May 2009 02:04:29 +0000 (19:04 -0700)

Merge branch 'js/maint-no-ln-across-libexec-and-bin' into maint

* js/maint-no-ln-across-libexec-and-bin:
Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile

Conflicts:
Makefile

Merge branch 'lt/maint-diff-reduce-lstat' into maintJunio C Hamano Tue, 26 May 2009 02:04:08 +0000 (19:04 -0700)

Merge branch 'lt/maint-diff-reduce-lstat' into maint

* lt/maint-diff-reduce-lstat:
Teach 'git checkout' to preload the index contents
Avoid unnecessary 'lstat()' calls in 'get_stat_data()'

Merge branch 'jm/format-patch-no-auto-n-when-k-is-given... Junio C Hamano Tue, 26 May 2009 02:03:52 +0000 (19:03 -0700)

Merge branch 'jm/format-patch-no-auto-n-when-k-is-given' into maint

* jm/format-patch-no-auto-n-when-k-is-given:
format-patch let -k override a config-specified format.numbered

Merge branch 'do/maint-merge-recursive-fix' into maintJunio C Hamano Tue, 26 May 2009 02:03:43 +0000 (19:03 -0700)

Merge branch 'do/maint-merge-recursive-fix' into maint

* do/maint-merge-recursive-fix:
merge-recursive: never leave index unmerged while recursing

Merge branch 'jk/maint-1.6.0-trace-argv' into maintJunio C Hamano Tue, 26 May 2009 02:03:20 +0000 (19:03 -0700)

Merge branch 'jk/maint-1.6.0-trace-argv' into maint

* jk/maint-1.6.0-trace-argv:
fix GIT_TRACE segfault with shell-quoted aliases

Conflicts:
alias.c

Merge branch 'np/push-delta' into maintJunio C Hamano Tue, 26 May 2009 02:02:11 +0000 (19:02 -0700)

Merge branch 'np/push-delta' into maint

* np/push-delta:
allow OFS_DELTA objects during a push

Merge branch 'ar/merge-one-file-diag' into maintJunio C Hamano Tue, 26 May 2009 02:01:59 +0000 (19:01 -0700)

Merge branch 'ar/merge-one-file-diag' into maint

* ar/merge-one-file-diag:
Clarify kind of conflict in merge-one-file helper

Merge branch 'ar/unlink-err' into maintJunio C Hamano Tue, 26 May 2009 02:01:50 +0000 (19:01 -0700)

Merge branch 'ar/unlink-err' into maint

* ar/unlink-err:
print unlink(2) errno in copy_or_link_directory
replace direct calls to unlink(2) with unlink_or_warn
Introduce an unlink(2) wrapper which gives warning if unlink failed

Merge branch 'jk/maint-add-empty' into maintJunio C Hamano Tue, 26 May 2009 02:01:41 +0000 (19:01 -0700)

Merge branch 'jk/maint-add-empty' into maint

* jk/maint-add-empty:
add: don't complain when adding empty project root

fix cat-file usage message and documentationJeff King Mon, 25 May 2009 10:33:15 +0000 (06:33 -0400)

fix cat-file usage message and documentation

cat-file with an object on the command line requires an
option to tell it what to output (type, size, pretty-print,
etc). However, the square brackets in the usage imply that
those options are not required. This patch switches them to
parentheses to indicate "required but grouped-OR" (curly
braces might also work, but this follows the convention used
already by "git stash").

While we're at it, let's change the <sha1> specifier in the
usage to <object>. That's what the documentation uses, and
it does actually use the regular object lookup.

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

fetch: report ref storage DF errors more accuratelyJeff King Mon, 25 May 2009 10:40:54 +0000 (06:40 -0400)

fetch: report ref storage DF errors more accurately

When we fail to store a fetched ref, we recommend that the
user try running "git prune" to remove up any old refs that
have been deleted by the remote, which would clear up any DF
conflicts. However, ref storage might fail for other
reasons (e.g., permissions problems) in which case the
advice is useless and misleading.

This patch detects when there is an actual DF situation and
only issues the advice when one is found.

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

lock_ref: inform callers of unavailable refJeff King Mon, 25 May 2009 10:37:15 +0000 (06:37 -0400)

lock_ref: inform callers of unavailable ref

One of the ways that locking might fail is that there is a
DF conflict between two refs (e.g., you want to lock
"foo/bar" but "foo" already exists). In this case, we return
an error, but there is no way for the caller to know the
specific problem.

This patch sets errno to ENOTDIR, which is the most sensible
code. It's what we would see if the refs were stored purely
in the filesystem (but these days we must check the
namespace manually due to packed refs).

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

Avoid "diff-index --cached" optimization under --find... Junio C Hamano Sat, 23 May 2009 06:14:25 +0000 (23:14 -0700)

Avoid "diff-index --cached" optimization under --find-copies-harder

When find-copies-harder is in effect, the diff frontends are expected to
feed all paths, not just changed paths, to the diffcore, so that copy
sources can be picked up. In such a case, not descending into subtrees
using the cache-tree information is simply wrong.

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

Optimize "diff-index --cached" using cache-treeJunio C Hamano Wed, 20 May 2009 22:57:22 +0000 (15:57 -0700)

Optimize "diff-index --cached" using cache-tree

When running "diff-index --cached" after making a change to only a small
portion of the index, there is no point unpacking unchanged subtrees into
the index recursively, only to find that all entries match anyway. Tweak
unpack_trees() logic that is used to read in the tree object to catch the
case where the tree entry we are looking at matches the index as a whole
by looking at the cache-tree.

As an exercise, after modifying a few paths in the kernel tree, here are
a few numbers on my Athlon 64X2 3800+:

(without patch, hot cache)
$ /usr/bin/time git diff --cached --raw
:100644 100644 b57e1f5... e69de29... M Makefile
:100644 000000 8c86b72... 0000000... D arch/x86/Makefile
:000000 100644 0000000... e69de29... A arche
0.07user 0.02system 0:00.09elapsed 102%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+9407minor)pagefaults 0swaps

(with patch, hot cache)
$ /usr/bin/time ../git.git/git-diff --cached --raw
:100644 100644 b57e1f5... e69de29... M Makefile
:100644 000000 8c86b72... 0000000... D arch/x86/Makefile
:000000 100644 0000000... e69de29... A arche
0.02user 0.00system 0:00.02elapsed 103%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+2446minor)pagefaults 0swaps

Cold cache numbers are very impressive, but it does not matter very much
in practice:

(without patch, cold cache)
$ su root sh -c 'echo 3 >/proc/sys/vm/drop_caches'
$ /usr/bin/time git diff --cached --raw
:100644 100644 b57e1f5... e69de29... M Makefile
:100644 000000 8c86b72... 0000000... D arch/x86/Makefile
:000000 100644 0000000... e69de29... A arche
0.06user 0.17system 0:10.26elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k
247032inputs+0outputs (1172major+8237minor)pagefaults 0swaps

(with patch, cold cache)
$ su root sh -c 'echo 3 >/proc/sys/vm/drop_caches'
$ /usr/bin/time ../git.git/git-diff --cached --raw
:100644 100644 b57e1f5... e69de29... M Makefile
:100644 000000 8c86b72... 0000000... D arch/x86/Makefile
:000000 100644 0000000... e69de29... A arche
0.02user 0.01system 0:01.01elapsed 3%CPU (0avgtext+0avgdata 0maxresident)k
18440inputs+0outputs (79major+2369minor)pagefaults 0swaps

This of course helps "git status" as well.

(without patch, hot cache)
$ /usr/bin/time ../git.git/git-status >/dev/null
0.17user 0.18system 0:00.35elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+5336outputs (0major+10970minor)pagefaults 0swaps

(with patch, hot cache)
$ /usr/bin/time ../git.git/git-status >/dev/null
0.10user 0.16system 0:00.27elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+5336outputs (0major+3921minor)pagefaults 0swaps

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

t4007: modernize the styleJunio C Hamano Sat, 23 May 2009 06:06:58 +0000 (23:06 -0700)

t4007: modernize the style

This is one of the oldest scripts; update it to match more modern style.
Notably, we should:

- Put the test title on the same line as the "test_expect_success", and
end the line with a single-quote to begin the body of the test which is
one multi-line string; and

- Run as many commands inside test_expect_success, not outside, to catch
unexpected breakages.

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

cache-tree.c::cache_tree_find(): simplify internal APIJunio C Hamano Wed, 20 May 2009 22:53:57 +0000 (15:53 -0700)

cache-tree.c::cache_tree_find(): simplify internal API

Earlier cache_tree_find() needs to be called with a valid cache_tree,
but repeated look-up may find an invalid or missing cache_tree in between.
Help simplify the callers by returning NULL to mean "nothing appropriate
found" when the input is NULL.

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

convert bare readlink to strbuf_readlinkJeff King Mon, 25 May 2009 10:46:09 +0000 (06:46 -0400)

convert bare readlink to strbuf_readlink

This particular readlink call never NUL-terminated its
result, making it a potential source of bugs (though there
is no bug now, as it currently always respects the length
field). Let's just switch it to strbuf_readlink which is
shorter and less error-prone.

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

t3701: ensure correctly set up repository after skipped... Johannes Sixt Mon, 25 May 2009 12:07:55 +0000 (14:07 +0200)

t3701: ensure correctly set up repository after skipped tests

There are two tests that are skipped if file modes are not obeyed by the
file system. In this case, the subsequent test failed because the
repository was in an unexpected state. This corrects it.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-options.txt: Clarify merge --squashMichael J Gruber Mon, 25 May 2009 16:00:10 +0000 (18:00 +0200)

merge-options.txt: Clarify merge --squash

With the --squash option, merge sets up the index just like for a real
merge, but without the merge info (stages). Say so.

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

parse-opts: add OPT_FILENAME and transition builtinsStephen Boyd Sat, 23 May 2009 18:53:13 +0000 (11:53 -0700)

parse-opts: add OPT_FILENAME and transition builtins

Commit dbd0f5c (Files given on the command line are relative to $cwd,
2008-08-06) introduced parse_options_fix_filename() as a minimal fix.
OPT_FILENAME is intended to be a more robust fix for the same issue.
OPT_FILENAME and its associated enum OPTION_FILENAME are used to
represent filename options within the parse options API.

This option is similar to OPTION_STRING. If --no is prefixed to the
option the filename is unset. If no argument is given and the default
value is set, the filename is set to the default value. The difference
is that the filename is prefixed with the prefix passed to
parse_options() (or parse_options_start()).

Update git-apply, git-commit, git-fmt-merge-msg, and git-tag to use
OPT_FILENAME with their filename options. Also, rename
parse_options_fix_filename() to fix_filename() as it is no longer
extern.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-opts: prepare for OPT_FILENAMEStephen Boyd Sat, 23 May 2009 18:53:12 +0000 (11:53 -0700)

parse-opts: prepare for OPT_FILENAME

To give OPT_FILENAME the prefix, we pass the prefix to parse_options()
which passes the prefix to parse_options_start() which sets the prefix
member of parse_opts_ctx accordingly. If there isn't a prefix in the
calling context, passing NULL will suffice.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/mktree' into sb/opt-filenameJunio C Hamano Mon, 25 May 2009 08:04:10 +0000 (01:04 -0700)

Merge branch 'jc/mktree' into sb/opt-filename

* jc/mktree:
mktree: validate entry type in input
mktree --batch: build more than one tree object
mktree --missing: updated usage message and man page
mktree --missing: allow missing objects
t1010: add mktree test
mktree: do not barf on a submodule commit
builtin-mktree.c: use a helper function to handle one line of input
mktree: use parse-options
build-in git-mktree

Merge branch 'sb/format-patch-parseopt' into sb/opt... Junio C Hamano Mon, 25 May 2009 07:59:59 +0000 (00:59 -0700)

Merge branch 'sb/format-patch-parseopt' into sb/opt-filename

* sb/format-patch-parseopt:
format-patch: migrate to parse-options API

Conflicts:
builtin-log.c