gitweb.git
Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 12 Apr 2009 22:20:29 +0000 (15:20 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
State the effect of filter-branch on graft explicitly
process_{tree,blob}: Remove useless xstrdup calls

State the effect of filter-branch on graft explicitlyDaniel Cheng (aka SDiZ) Fri, 10 Apr 2009 06:26:49 +0000 (14:26 +0800)

State the effect of filter-branch on graft explicitly

Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

process_{tree,blob}: Remove useless xstrdup callsLinus Torvalds Fri, 10 Apr 2009 22:20:18 +0000 (15:20 -0700)

process_{tree,blob}: Remove useless xstrdup calls

On Wed, 8 Apr 2009, Björn Steinbrink wrote:
>
> The name of the processed object was duplicated for passing it to
> add_object(), but that already calls path_name, which allocates a new
> string anyway. So the memory allocated by the xstrdup calls just went
> nowhere, leaking memory.

Ack, ack.

There's another easy 5% or so for the built-in object walker: once we've
created the hash from the name, the name isn't interesting any more, and
so something trivial like this can help a bit.

Does it matter? Probably not on its own. But a few more memory saving
tricks and it might all make a difference.

Linus

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

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Thu, 9 Apr 2009 06:22:05 +0000 (23:22 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
process_{tree,blob}: Remove useless xstrdup calls

Merge branch 'jc/maint-1.6.0-blame-s' into maint-1.6.1Junio C Hamano Thu, 9 Apr 2009 06:02:17 +0000 (23:02 -0700)

Merge branch 'jc/maint-1.6.0-blame-s' into maint-1.6.1

* jc/maint-1.6.0-blame-s:
blame: read custom grafts given by -S before calling setup_revisions()

Conflicts:
builtin-blame.c

Merge branch 'bc/maint-1.6.1-branch-deleted-was' into... Junio C Hamano Thu, 9 Apr 2009 06:01:15 +0000 (23:01 -0700)

Merge branch 'bc/maint-1.6.1-branch-deleted-was' into maint-1.6.1

* bc/maint-1.6.1-branch-deleted-was:
git-branch: display "was sha1" on branch deletion rather than just "sha1"

Merge branch 'js/maint-1.6.0-exec-path-env' into maint... Junio C Hamano Thu, 9 Apr 2009 06:01:10 +0000 (23:01 -0700)

Merge branch 'js/maint-1.6.0-exec-path-env' into maint-1.6.1

* js/maint-1.6.0-exec-path-env:
Propagate --exec-path setting to external commands via GIT_EXEC_PATH

Merge branch 'tr/maint-1.6.1-doc-format-patch--root... Junio C Hamano Thu, 9 Apr 2009 06:00:21 +0000 (23:00 -0700)

Merge branch 'tr/maint-1.6.1-doc-format-patch--root' into maint-1.6.1

* tr/maint-1.6.1-doc-format-patch--root:
Documentation: format-patch --root clarifications

process_{tree,blob}: Remove useless xstrdup callsBjörn Steinbrink Wed, 8 Apr 2009 11:28:54 +0000 (13:28 +0200)

process_{tree,blob}: Remove useless xstrdup calls

The name of the processed object was duplicated for passing it to
add_object(), but that already calls path_name, which allocates a new
string anyway. So the memory allocated by the xstrdup calls just went
nowhere, leaking memory.

This reduces the RSS usage for a "rev-list --all --objects" by about 10% on
the gentoo repo (fully packed) as well as linux-2.6.git:

gentoo:
| old | new
----------------|-------------------------------
RSS | 1537284 | 1388408
VSZ | 1816852 | 1667952
time elapsed | 1:49.62 | 1:48.99
min. page faults| 417178 | 379919

linux-2.6.git:
| old | new
----------------|-------------------------------
RSS | 324452 | 292996
VSZ | 491792 | 460376
time elapsed | 0:14.53 | 0:14.28
min. page faults| 89360 | 81613

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

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Wed, 8 Apr 2009 05:51:14 +0000 (22:51 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
Documentation: clarify .gitattributes search
git-checkout.txt: clarify that <branch> applies when no path is given.
git-checkout.txt: fix incorrect statement about HEAD and index

Documentation: clarify .gitattributes searchJason Merrill Mon, 6 Apr 2009 15:03:36 +0000 (11:03 -0400)

Documentation: clarify .gitattributes search

Use the term "toplevel of the work tree" in gitattributes.txt and
gitignore.txt to define the limits of the search for those files.

Signed-off-by: Jason Merrill <jason@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-checkout.txt: clarify that <branch> applies when... Matthieu Moy Tue, 7 Apr 2009 12:43:53 +0000 (14:43 +0200)

git-checkout.txt: clarify that <branch> applies when no path is given.

Otherwise, the sentence "Defaults to HEAD." can be mis-read to mean
that "git checkout -- hello.c" checks-out from HEAD.

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

git-checkout.txt: fix incorrect statement about HEAD... Matthieu Moy Mon, 6 Apr 2009 20:45:21 +0000 (22:45 +0200)

git-checkout.txt: fix incorrect statement about HEAD and index

The command "git checkout" checks out from the index by default, not
HEAD (the introducing comment were correct, but the detailled
explanation added below were not).

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

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 5 Apr 2009 08:04:38 +0000 (01:04 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
commit: abort commit if interactive add failed
git-repack: use non-dashed update-server-info

Conflicts:
builtin-commit.c

commit: abort commit if interactive add failedJeff King Fri, 3 Apr 2009 19:28:56 +0000 (15:28 -0400)

commit: abort commit if interactive add failed

Previously we ignored the result of calling add_interactive,
which meant that if an error occurred we simply committed
whatever happened to be in the index.

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

git-repack: use non-dashed update-server-infoDan McGee Sat, 4 Apr 2009 16:59:55 +0000 (11:59 -0500)

git-repack: use non-dashed update-server-info

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Thu, 2 Apr 2009 05:35:57 +0000 (22:35 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
Documentation: Remove an odd "instead"

Documentation: Remove an odd "instead"Holger Weiß Tue, 31 Mar 2009 16:57:01 +0000 (18:57 +0200)

Documentation: Remove an odd "instead"

Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Mon, 30 Mar 2009 20:23:53 +0000 (13:23 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
Fix bash completion in path with spaces
bash completion: only show 'log --merge' if merging
git-tag(1): add hint about commit messages
Documentation: update graph api example.

Fix bash completion in path with spacesDaniel Cheng (aka SDiZ) Mon, 30 Mar 2009 11:27:37 +0000 (19:27 +0800)

Fix bash completion in path with spaces

Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash completion: only show 'log --merge' if mergingThomas Rast Mon, 16 Feb 2009 16:34:57 +0000 (17:34 +0100)

bash completion: only show 'log --merge' if merging

The gitk completion only shows --merge if MERGE_HEAD is present.
Do it the same way for git-log completion.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-tag(1): add hint about commit messagesNico -telmich- Schottelius Mon, 30 Mar 2009 11:58:21 +0000 (13:58 +0200)

git-tag(1): add hint about commit messages

If a tag is not annotated, git tag displays the commit message
instead. Add this hint to the manpage to unhide this secret.

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: update graph api example.Allan Caffee Mon, 30 Mar 2009 14:13:45 +0000 (10:13 -0400)

Documentation: update graph api example.

As of commit 03300c0 the graph API uses '*' for all nodes including merges.
This updates the example in the documentation to match.

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Mon, 30 Mar 2009 06:11:03 +0000 (23:11 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
import-zips: fix thinko

import-zips: fix thinkoJohannes Schindelin Sun, 29 Mar 2009 20:42:27 +0000 (22:42 +0200)

import-zips: fix thinko

Embarrassingly, the common prefix calculation did not work properly, due
to a mistake in the assignment: instead of assigning the dirname of the
current file name, the dirname of the current common prefix needs to
be assigned to common prefix, when the current prefix does not match the
current file name.

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

test-lib: Clean up comments and Makefile.Emil Sit Sat, 28 Mar 2009 01:57:18 +0000 (21:57 -0400)

test-lib: Clean up comments and Makefile.

Bring documentation in test-lib and clean target
in Makefile in-line with abc5d372.

Signed-off-by: Emil Sit <sit@emilsit.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: format-patch --root clarificationsThomas Rast Thu, 26 Mar 2009 17:29:25 +0000 (18:29 +0100)

Documentation: format-patch --root clarifications

Users were confused about the meaning and use of the --root option.
Notably, since 68c2ec7 (format-patch: show patch text for the root
commit, 2009-01-10), --root has nothing to do with showing the patch
text for the root commit any more.

Shorten and clarify the corresponding paragraph in the DESCRIPTION
section, document --root under OPTIONS, and add an explicit note that
root commits are formatted regardless.

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

diff --no-index: Do not generate patch output if other... Johannes Sixt Wed, 25 Mar 2009 17:19:46 +0000 (18:19 +0100)

diff --no-index: Do not generate patch output if other output is requested

Previously, 'git diff --no-index --stat a b' generated patch output in
addition to the --stat output (or whatever other output format was
requested). Now only the requested output is generated, and patch
output remains the default.

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

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Tue, 24 Mar 2009 22:31:15 +0000 (15:31 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
close_sha1_file(): make it easier to diagnose errors
avoid possible overflow in delta size filtering computation

close_sha1_file(): make it easier to diagnose errorsLinus Torvalds Tue, 24 Mar 2009 19:31:36 +0000 (12:31 -0700)

close_sha1_file(): make it easier to diagnose errors

A bug report with "unable to write sha1 file" made us realize that we do
not have enough information to guess why close() is failing.

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

avoid possible overflow in delta size filtering computationNicolas Pitre Tue, 24 Mar 2009 19:56:12 +0000 (15:56 -0400)

avoid possible overflow in delta size filtering computation

On a 32-bit system, the maximum possible size for an object is less than
4GB, while 64-bit systems may cope with larger objects. Due to this
limitation, variables holding object sizes are using an unsigned long
type (32 bits on 32-bit systems, or 64 bits on 64-bit systems).

When large objects are encountered, and/or people play with large delta
depth values, it is possible for the maximum allowed delta size
computation to overflow, especially on a 32-bit system. When this
occurs, surviving result bits may represent a value much smaller than
what it is supposed to be, or even zero. This prevents some objects
from being deltified although they do get deltified when a smaller depth
limit is used. Fix this by always performing a 64-bit multiplication.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 22 Mar 2009 22:40:55 +0000 (15:40 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
everyday: use the dashless form of git-init

everyday: use the dashless form of git-initDavid Aguilar Sun, 22 Mar 2009 09:15:13 +0000 (02:15 -0700)

everyday: use the dashless form of git-init

The 'Everyday GIT' guide was using the old dashed form
of git-init.

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

Merge branch 'js/maint-1.6.0-path-normalize' into maint... Junio C Hamano Sun, 22 Mar 2009 05:59:19 +0000 (22:59 -0700)

Merge branch 'js/maint-1.6.0-path-normalize' into maint-1.6.1

* js/maint-1.6.0-path-normalize:
Remove unused normalize_absolute_path()
Test and fix normalize_path_copy()
Fix GIT_CEILING_DIRECTORIES on Windows
Move sanitary_path_copy() to path.c and rename it to normalize_path_copy()
Make test-path-utils more robust against incorrect use

Merge branch 'jc/maint-1.6.0-pack-directory' into maint... Junio C Hamano Sun, 22 Mar 2009 05:53:36 +0000 (22:53 -0700)

Merge branch 'jc/maint-1.6.0-pack-directory' into maint-1.6.1

* jc/maint-1.6.0-pack-directory:
Fix odb_mkstemp() on AIX
Make sure objects/pack exists before creating a new pack

Conflicts:
wrapper.c

Propagate --exec-path setting to external commands... Johannes Sixt Sat, 21 Mar 2009 22:21:18 +0000 (23:21 +0100)

Propagate --exec-path setting to external commands via GIT_EXEC_PATH

Let PATH0=$PATH that was set before the invocation.
Let /foo be a build directory.
Let /pfx be the installation prefix.
Let pfxexecpath=/pfx/libexec/git-core.

The following is going on when 'git --exec-path=/foo gc' is invoked:

1. git sets PATH=/foo:$PATH0 using the path from --exec-path

2. gc execs 'git repack' (note: no dash).

3. Since there is a git in /foo (it's a build directory), /foo/git is
taken.

4. No explicit exec-path is set this time, hence, this secondary git sets
PATH=$pfxexecpath:/foo:$PATH

5. Since 'repack' is not a built-in, execv_dashed_external execs
'git-repack' (note: dash).

6. There is a $pfxexecpath/git-repack, and it is taken.

7. This git-repack runs 'git pack-objects' (note: no dash).

8. There is no git in $pfxexecpath, but there is one in /foo. Hence,
/foo/git is run.

9. pack-objects is a builtin, hence, in effect /foo/git-pack-objects
is run.

As you can see, the way in which we previously set the PATH allowed to
mix gits of different vintage. By setting GIT_EXEC_PATH when --exec-path
was given on the command line, we reduce the confusion.

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

git-branch: display "was sha1" on branch deletion rathe... Brandon Casey Sun, 22 Mar 2009 00:09:17 +0000 (19:09 -0500)

git-branch: display "was sha1" on branch deletion rather than just "sha1"

Make it more pleasant to read about a branch deletion by adding "was".
Jeff King suggested this, and I ignored it. He was right.

Update t3200 test again to match the change in output.

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

blame: read custom grafts given by -S before calling... Junio C Hamano Wed, 18 Mar 2009 07:13:03 +0000 (00:13 -0700)

blame: read custom grafts given by -S before calling setup_revisions()

setup_revisions() while getting the command line arguments parses the
given commits from the command line, which means their direct parents will
not be rewritten by the custom graft file.

Call read_ancestry() early to work around this issue.

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

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Fri, 13 Mar 2009 06:36:57 +0000 (23:36 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
bisect: fix another instance of eval'ed string
bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped
Support "\" in non-wildcard exclusion entries

Conflicts:
git-bisect.sh

Merge branch 'en/maint-1.6.1-hash-object' into maint... Junio C Hamano Fri, 13 Mar 2009 06:11:23 +0000 (23:11 -0700)

Merge branch 'en/maint-1.6.1-hash-object' into maint-1.6.1

* en/maint-1.6.1-hash-object:
Ensure proper setup of git_dir for git-hash-object

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into... Junio C Hamano Fri, 13 Mar 2009 04:48:43 +0000 (21:48 -0700)

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.0

* ks/maint-1.6.0-mailinfo-folded:
mailinfo: tests for RFC2047 examples
mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'
mailinfo: 'From:' header should be unfold as well
mailinfo: correctly handle multiline 'Subject:' header

Merge branch 'cc/maint-1.6.0-bisect-fix' into maint... Junio C Hamano Fri, 13 Mar 2009 04:48:26 +0000 (21:48 -0700)

Merge branch 'cc/maint-1.6.0-bisect-fix' into maint-1.6.0

* cc/maint-1.6.0-bisect-fix:
bisect: fix another instance of eval'ed string
bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped

Merge branch 'fg/maint-1.6.0-exclude-bq' into maint... Junio C Hamano Fri, 13 Mar 2009 04:48:07 +0000 (21:48 -0700)

Merge branch 'fg/maint-1.6.0-exclude-bq' into maint-1.6.0

* fg/maint-1.6.0-exclude-bq:
Support "\" in non-wildcard exclusion entries

Merge branch 'js/maint-1.6.1-filter-branch-submodule... Junio C Hamano Fri, 13 Mar 2009 04:46:50 +0000 (21:46 -0700)

Merge branch 'js/maint-1.6.1-filter-branch-submodule' into maint-1.6.1

* js/maint-1.6.1-filter-branch-submodule:
filter-branch: do not consider diverging submodules a 'dirty worktree'

Merge branch 'gt/maint-1.6.1-utf8-width' into maint... Junio C Hamano Fri, 13 Mar 2009 04:46:35 +0000 (21:46 -0700)

Merge branch 'gt/maint-1.6.1-utf8-width' into maint-1.6.1

* gt/maint-1.6.1-utf8-width:
builtin-blame.c: Use utf8_strwidth for author's names
utf8: add utf8_strwidth()

Merge branch 'js/maint-1.6.1-remote-remove-mirror'... Junio C Hamano Fri, 13 Mar 2009 04:45:56 +0000 (21:45 -0700)

Merge branch 'js/maint-1.6.1-remote-remove-mirror' into maint-1.6.1

* js/maint-1.6.1-remote-remove-mirror:
builtin-remote: make rm operation safer in mirrored repository
builtin-remote: make rm() use properly named variable to hold return value

Merge branch 'ek/maint-1.6.1-filter-branch-bare' into... Junio C Hamano Fri, 13 Mar 2009 04:45:21 +0000 (21:45 -0700)

Merge branch 'ek/maint-1.6.1-filter-branch-bare' into maint-1.6.1

* ek/maint-1.6.1-filter-branch-bare:
filter-branch: Fix fatal error on bare repositories

Merge branch 'jc/maint-1.6.1-add-u-remove-conflicted... Junio C Hamano Fri, 13 Mar 2009 04:45:14 +0000 (21:45 -0700)

Merge branch 'jc/maint-1.6.1-add-u-remove-conflicted' into maint-1.6.1

* jc/maint-1.6.1-add-u-remove-conflicted:
add -u: do not fail to resolve a path as deleted

Merge branch 'js/maint-1.6.1-rebase-i-submodule' into... Junio C Hamano Fri, 13 Mar 2009 04:45:02 +0000 (21:45 -0700)

Merge branch 'js/maint-1.6.1-rebase-i-submodule' into maint-1.6.1

* js/maint-1.6.1-rebase-i-submodule:
Fix submodule squashing into unrelated commit
rebase -i squashes submodule changes into unrelated commit

Merge branch 'jc/maint-1.6.1-allow-uninteresting-missin... Junio C Hamano Fri, 13 Mar 2009 04:44:48 +0000 (21:44 -0700)

Merge branch 'jc/maint-1.6.1-allow-uninteresting-missing' into maint-1.6.1

* jc/maint-1.6.1-allow-uninteresting-missing:
revision traversal: allow UNINTERESTING objects to be missing

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into... Junio C Hamano Fri, 13 Mar 2009 04:44:00 +0000 (21:44 -0700)

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.1

* ks/maint-1.6.0-mailinfo-folded:
mailinfo: tests for RFC2047 examples
mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'
mailinfo: 'From:' header should be unfold as well
mailinfo: correctly handle multiline 'Subject:' header

Merge branch 'jk/maint-1.6.1-cleanup-after-exec-failure... Junio C Hamano Fri, 13 Mar 2009 04:43:38 +0000 (21:43 -0700)

Merge branch 'jk/maint-1.6.1-cleanup-after-exec-failure' into maint-1.6.1

* jk/maint-1.6.1-cleanup-after-exec-failure:
git: use run_command() to execute dashed externals
run_command(): help callers distinguish errors
run_command(): handle missing command errors more gracefully
git: s/run_command/run_builtin/

Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into... Junio C Hamano Fri, 13 Mar 2009 03:01:28 +0000 (20:01 -0700)

Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into maint-1.6.0

* jc/maint-1.6.0-split-diff-metainfo:
diff.c: output correct index lines for a split diff

builtin-revert.c: release index lock when cherry-pickin... Chris Johnsen Sat, 7 Mar 2009 09:30:51 +0000 (03:30 -0600)

builtin-revert.c: release index lock when cherry-picking an empty commit

When a cherry-pick of an empty commit is done, release the lock
held on the index.

The fix is the same as was applied to similar code in 4271666046.

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

Documentation: minor grammatical fixes.David J. Mellor Sat, 28 Feb 2009 21:12:59 +0000 (13:12 -0800)

Documentation: minor grammatical fixes.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ensure proper setup of git_dir for git-hash-objectElijah Newren Sat, 28 Feb 2009 19:56:49 +0000 (12:56 -0700)

Ensure proper setup of git_dir for git-hash-object

Call setup_git_directory() before git_config() to make sure git_dir is set
to the proper value.

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

Merge branch 'maint-1.6.0' into maintJunio C Hamano Sat, 28 Feb 2009 22:05:09 +0000 (14:05 -0800)

Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
added missing backtick in git-apply.txt

added missing backtick in git-apply.txtDanijel Tasov Sat, 28 Feb 2009 20:03:54 +0000 (21:03 +0100)

added missing backtick in git-apply.txt

Signed-off-by: Danijel Tasov <dt@korn.shell.la>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: fix another instance of eval'ed stringChristian Couder Fri, 27 Feb 2009 06:31:22 +0000 (07:31 +0100)

bisect: fix another instance of eval'ed string

When there is nothing to be skipped, the output from
rev-list --bisect-vars was eval'ed without first being
strung together with &&; this is probably not a problem
as it is much less likely to be a bad input than the list
handcrafted by the filter_skip function, but it still is
a good discipline.

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

bisect: fix quoting TRIED revs when "bad" commit is... Christian Couder Fri, 27 Feb 2009 06:31:22 +0000 (07:31 +0100)

bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped

When the "bad" commit was also "skip"ped and when more than one
commit was skipped, the "filter_skipped" function would have
printed something like:

bisect_rev=<hash1>|<hash2>

(where <hash1> and <hash2> are hexadecimal sha1 hashes)

and this would have been evaled later as piping "bisect_rev=<hash1>"
into "<hash2>", which would have failed.

So this patch makes the "filter_skipped" function properly quote
what it outputs, so that it will print something like:

bisect_rev='<hash1>|<hash2>'

which will be properly evaled later. The caller was not stopping
properly because the scriptlet this function returned to be evaled
was not strung together with && and because of this, an error in
an earlier part of the output was simply ignored.

A test case is added to the test suite.

And while at it, we also initialize the VARS, FOUND and TRIED
variables, so that we protect ourselves from environment variables
the user may have with these names.

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

Fix odb_mkstemp() on AIXMike Ralphson Thu, 26 Feb 2009 15:31:52 +0000 (16:31 +0100)

Fix odb_mkstemp() on AIX

The AIX mkstemp() modifies its template parameter to an empty string if
the call fails. The existing code had already recomputed the template,
but too late to be good.

See also 6ff6af62, which fixed this problem in a different spot.

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make sure objects/pack exists before creating a new... Junio C Hamano Wed, 25 Feb 2009 07:11:29 +0000 (23:11 -0800)

Make sure objects/pack exists before creating a new pack

In a repository created with git older than f49fb35 (git-init-db: create
"pack" subdirectory under objects, 2005-06-27), objects/pack/ directory is
not created upon initialization. It was Ok because subdirectories are
created as needed inside directories init-db creates, and back then,
packfiles were recent invention.

After the said commit, new codepaths started relying on the presense of
objects/pack/ directory in the repository. This was exacerbated with
8b4eb6b (Do not perform cross-directory renames when creating packs,
2008-09-22) that moved the location temporary pack files are created from
objects/ directory to objects/pack/ directory, because moving temporary to
the final location was done carefully with lazy leading directory creation.

Many packfile related operations in such an old repository can fail
mysteriously because of this.

This commit introduces two helper functions to make things work better.

- odb_mkstemp() is a specialized version of mkstemp() to refactor the
code and teach it to create leading directories as needed;

- odb_pack_keep() refactors the code to create a ".keep" file while
create leading directories as needed.

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

More friendly message when locking the index fails.Matthieu Moy Thu, 19 Feb 2009 12:54:18 +0000 (13:54 +0100)

More friendly message when locking the index fails.

Just saying that index.lock exists doesn't tell the user _what_ to do
to fix the problem. We should give an indication that it's normally
safe to delete index.lock after making sure git isn't running here.

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

Document git blame --reverse.Matthieu Moy Thu, 19 Feb 2009 12:34:48 +0000 (13:34 +0100)

Document git blame --reverse.

This was introduced in 85af7929ee125385c2771fa4eaccfa2f29dc63c9 but
not documented outside the commit message.

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

Documentation: Note file formats send-email acceptsTodd Zullinger Thu, 19 Feb 2009 03:51:06 +0000 (22:51 -0500)

Documentation: Note file formats send-email accepts

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

tests: fix "export var=val"Junio C Hamano Wed, 18 Feb 2009 19:17:27 +0000 (11:17 -0800)

tests: fix "export var=val"

Some shells do not like "export var=val"; the right way to write
it is to do an assignment and then export just the variable name.

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

Skip timestamp differences for diff --no-indexMichael Spang Wed, 18 Feb 2009 06:48:06 +0000 (01:48 -0500)

Skip timestamp differences for diff --no-index

We display empty diffs for files whose timestamps have changed.
Usually, refreshing the index makes those empty diffs go away.
However, when not using the index they are not very useful and
there is no option to suppress them.

This forces on the skip_stat_unmatch option for diff --no-index,
suppressing any empty diffs. This option is also used for diffs
against the index when "diff.autorefreshindex" is set, but that
option does not apply to diff --no-index.

Signed-off-by: Michael Spang <mspang@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-push: --all, --mirror, --tags can... Gerrit Pape Tue, 17 Feb 2009 09:25:02 +0000 (09:25 +0000)

Documentation/git-push: --all, --mirror, --tags can not be combined

While b259f09 made git-push output a better error message for 'git-push
--all --tags', this commit fixes the synopsis in the documentation.

Inconsistency spotted and fix suggested by Jari Aalto through
http://bugs.debian.org/502567

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Support "\" in non-wildcard exclusion entriesFinn Arne Gangstad Tue, 10 Feb 2009 14:20:17 +0000 (15:20 +0100)

Support "\" in non-wildcard exclusion entries

"\" was treated differently in exclude rules depending on whether a
wildcard match was done. For wildcard rules, "\" was de-escaped in
fnmatch, but this was not done for other rules since they used strcmp
instead. A file named "#foo" would not be excluded by "\#foo", but would
be excluded by "\#foo*".

We now treat all rules with "\" as wildcard rules.

Another solution could be to de-escape all non-wildcard rules as we
read them, but we would have to do the de-escaping exactly as fnmatch
does it to avoid inconsistencies.

Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Prepare for 1.6.1.4.Junio C Hamano Thu, 12 Feb 2009 02:44:03 +0000 (18:44 -0800)

Prepare for 1.6.1.4.

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

Merge branch 'maint-1.6.0' into maintJunio C Hamano Thu, 12 Feb 2009 02:32:37 +0000 (18:32 -0800)

Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
Make repack less likely to corrupt repository
fast-export: ensure we traverse commits in topological order
Clear the delta base cache if a pack is rebuilt

Make repack less likely to corrupt repositoryJunio C Hamano Tue, 10 Feb 2009 20:16:31 +0000 (12:16 -0800)

Make repack less likely to corrupt repository

Some platforms refuse to rename a file that is open. When repacking an
already packed repository without adding any new object, the resulting
pack will contain the same set of objects as an existing pack, and on such
platforms, a newly created packfile cannot replace the existing one.

The logic detected this issue but did not try hard enough to recover from
it. Especially because the files that needs renaming come in pairs, there
potentially are different failure modes that one can be renamed but the
others cannot. Asking manual recovery to end users were error prone.

This patch tries to make it more robust by first making sure all the
existing files that need to be renamed have been renamed before
continuing, and attempts to roll back if some failed to rename.

This is based on an initial patch by Robin Rosenberg.

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

fast-export: ensure we traverse commits in topological... Elijah Newren Wed, 11 Feb 2009 06:03:53 +0000 (23:03 -0700)

fast-export: ensure we traverse commits in topological order

fast-export will only list as parents those commits which have already
been traversed (making it appear as if merges have been squashed if not
all parents have been traversed). To avoid this silent squashing of
merge commits, we request commits in topological order.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Clear the delta base cache if a pack is rebuiltShawn O. Pearce Wed, 11 Feb 2009 18:15:30 +0000 (10:15 -0800)

Clear the delta base cache if a pack is rebuilt

There is some risk that re-opening a regenerated pack file with
different offsets could leave stale entries within the delta base
cache that could be matched up against other objects using the same
"struct packed_git*" and pack offset.

Throwing away the entire delta base cache in this case is safer,
as we don't have to worry about a recycled "struct packed_git*"
matching to the wrong base object, resulting in delta apply
errors while unpacking an object.

Suggested-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.5.6' into maintJunio C Hamano Wed, 11 Feb 2009 10:00:07 +0000 (02:00 -0800)

Merge branch 'maint-1.5.6' into maint

* maint-1.5.6:
revision traversal and pack: notice and die on missing commit

Merge branch 'maint-1.5.5' into maint-1.5.6Junio C Hamano Wed, 11 Feb 2009 09:41:22 +0000 (01:41 -0800)

Merge branch 'maint-1.5.5' into maint-1.5.6

* maint-1.5.5:
revision traversal and pack: notice and die on missing commit

Conflicts:
revision.c

Merge branch 'maint-1.5.4' into maint-1.5.5Junio C Hamano Wed, 11 Feb 2009 09:40:12 +0000 (01:40 -0800)

Merge branch 'maint-1.5.4' into maint-1.5.5

* maint-1.5.4:
revision traversal and pack: notice and die on missing commit

revision traversal and pack: notice and die on missing... Junio C Hamano Wed, 11 Feb 2009 09:27:43 +0000 (01:27 -0800)

revision traversal and pack: notice and die on missing commit

cc0e6c5 (Handle return code of parse_commit in revision machinery,
2007-05-04) attempted to tighten error checking in the revision machinery,
but it wasn't enough. When get_revision_1() was asked for the next commit
to return, it tries to read and simplify the parents of the commit to be
returned, but an error while doing so was silently ignored and reported as
a truncated history to the caller instead.

This resulted in an early end of "git log" output or a pack that lacks
older commits from "git pack-objects", without any error indication in the
exit status from these commands, even though the underlying parse_commit()
issues an error message to the end user.

Note that the codepath in add_parents_list() that paints parents of an
UNINTERESTING commit UNINTERESTING silently ignores the error when
parse_commit() fails; this is deliberate and in line with aeeae1b
(revision traversal: allow UNINTERESTING objects to be missing,
2009-01-27).

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

Merge branch 'maint-1.6.0' into maintJunio C Hamano Tue, 10 Feb 2009 23:32:26 +0000 (15:32 -0800)

Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
Clear the delta base cache during fast-import checkpoint

Clear the delta base cache during fast-import checkpointShawn O. Pearce Tue, 10 Feb 2009 21:36:12 +0000 (13:36 -0800)

Clear the delta base cache during fast-import checkpoint

Otherwise we may reuse the same memory address for a totally
different "struct packed_git", and a previously cached object from
the prior occupant might be returned when trying to unpack an object
from the new pack.

Found-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: add $prevent_xss option to prevent XSS by repos... Matt McCutchen Sun, 8 Feb 2009 00:00:09 +0000 (19:00 -0500)

gitweb: add $prevent_xss option to prevent XSS by repository content

Add a gitweb configuration variable $prevent_xss that disables features
to prevent content in repositories from launching cross-site scripting
(XSS) attacks in the gitweb domain. Currently, this option makes gitweb
ignore README.html (a better solution may be worked out in the future)
and serve a blob_plain file of an untrusted type with
"Content-Disposition: attachment", which tells the browser not to show
the file at its original URL.

The XSS prevention is currently off by default.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rev-list: fix showing distance when using --bisect-allChristian Couder Sun, 8 Feb 2009 14:54:47 +0000 (15:54 +0100)

rev-list: fix showing distance when using --bisect-all

Before d467a52 ("Make '--decorate' set an explicit 'show_decorations'
flag", Nov 3 2008), commit decorations were shown whenever they exist, and
distances stored in them by "git rev-list --bisect-all" were automatically
shown. d467a52 changed the rule so that commit decorations are not shown
unless rev_info explicitly asks to, with its show_decorations bit, but
forgot that the ones "git rev-list --bisect-all" adds need to be shown.

This patch fixes this old breakage.

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

Remove unused normalize_absolute_path()Johannes Sixt Sat, 7 Feb 2009 15:08:31 +0000 (16:08 +0100)

Remove unused normalize_absolute_path()

This function is now superseded by normalize_path_copy().

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

Test and fix normalize_path_copy()Johannes Sixt Sat, 7 Feb 2009 15:08:30 +0000 (16:08 +0100)

Test and fix normalize_path_copy()

This changes the test-path-utils utility to invoke normalize_path_copy()
instead of normalize_absolute_path() because the latter is about to be
removed.

The test cases in t0060 are adjusted in two regards:

- normalize_path_copy() more often leaves a trailing slash in the result.
This has no negative side effects because the new user of this function,
longest_ancester_length(), already accounts for this behavior.

- The function can fail.

The tests uncover a flaw in normalize_path_copy(): If there are
sufficiently many '..' path components so that the root is reached, such as
in "/d1/s1/../../d2", then the leading slash was lost. This manifested
itself that (assuming there is a repository at /tmp/foo)

$ git add /d1/../tmp/foo/some-file

reported 'pathspec is outside repository'. This is now fixed.

Moreover, the test case descriptions of t0060 now include the test data and
expected outcome.

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

Fix GIT_CEILING_DIRECTORIES on WindowsRené Scharfe Sat, 7 Feb 2009 15:08:29 +0000 (16:08 +0100)

Fix GIT_CEILING_DIRECTORIES on Windows

Using git with GIT_CEILING_DIRECTORIES crashed on Windows due to a failed
assertion in normalize_absolute_path(): This function expects absolute
paths to start with a slash, while on Windows they can start with a drive
letter or a backslash.

This fixes it by using the alternative, normalize_path_copy() instead,
which can handle Windows-style paths just fine.

Secondly, the portability macro PATH_SEP is used instead of expecting
colons to be used as path list delimiter.

The test script t1504 is also changed to help MSYS's bash recognize some
program arguments as path list. (MSYS's bash must translate POSIX-style
path lists to Windows-style path lists, and the heuristic did not catch
some cases.)

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

Move sanitary_path_copy() to path.c and rename it to... Johannes Sixt Sat, 7 Feb 2009 15:08:28 +0000 (16:08 +0100)

Move sanitary_path_copy() to path.c and rename it to normalize_path_copy()

This function and normalize_absolute_path() do almost the same thing. The
former already works on Windows, but the latter crashes.

In subsequent changes we will remove normalize_absolute_path(). Here we
make the replacement function reusable. On the way we rename it to reflect
that it does some path normalization. Apart from that this is only moving
around code.

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

Make test-path-utils more robust against incorrect useJohannes Sixt Sat, 7 Feb 2009 15:08:27 +0000 (16:08 +0100)

Make test-path-utils more robust against incorrect use

Previously, this test utility happily returned with exit code 0 if garbage
was thrown at it. Now it reports failure if an unknown function name was
given on the command line.

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

GIT 1.6.1.3 v1.6.1.3Junio C Hamano Sat, 7 Feb 2009 08:51:47 +0000 (00:51 -0800)

GIT 1.6.1.3

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

Merge branch 'maint-1.6.0' into maintJunio C Hamano Fri, 6 Feb 2009 03:38:58 +0000 (19:38 -0800)

Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
Fixed broken git help -w when installing from RPM

Merge branch 'jc/maint-apply-fix' into maintJunio C Hamano Fri, 6 Feb 2009 02:06:11 +0000 (18:06 -0800)

Merge branch 'jc/maint-apply-fix' into maint

* jc/maint-apply-fix:
builtin-apply.c: do not set bogus mode in check_preimage() for deleted path

Merge branch 'am/maint-push-doc' into maintJunio C Hamano Fri, 6 Feb 2009 02:06:03 +0000 (18:06 -0800)

Merge branch 'am/maint-push-doc' into maint

* am/maint-push-doc:
Documentation: rework src/dst description in git push
Documentation: more git push examples
Documentation: simplify refspec format description

Merge branch 'sg/maint-gitdir-in-subdir' into maintJunio C Hamano Fri, 6 Feb 2009 02:05:43 +0000 (18:05 -0800)

Merge branch 'sg/maint-gitdir-in-subdir' into maint

* sg/maint-gitdir-in-subdir:
Fix gitdir detection when in subdir of gitdir

Merge branch 'lt/maint-wrap-zlib' into maintJunio C Hamano Fri, 6 Feb 2009 02:01:00 +0000 (18:01 -0800)

Merge branch 'lt/maint-wrap-zlib' into maint

* lt/maint-wrap-zlib:
Wrap inflate and other zlib routines for better error reporting

Conflicts:
http-push.c
http-walker.c
sha1_file.c

Merge branch 'jc/maint-split-diff-metainfo' into maintJunio C Hamano Fri, 6 Feb 2009 01:54:17 +0000 (17:54 -0800)

Merge branch 'jc/maint-split-diff-metainfo' into maint

* jc/maint-split-diff-metainfo:
diff.c: output correct index lines for a split diff

Merge branch 'js/maint-all-implies-HEAD' into maintJunio C Hamano Fri, 6 Feb 2009 01:54:12 +0000 (17:54 -0800)

Merge branch 'js/maint-all-implies-HEAD' into maint

* js/maint-all-implies-HEAD:
bundle: allow the same ref to be given more than once
revision walker: include a detached HEAD in --all

Merge branch 'kc/maint-diff-bwi-fix' into maintJunio C Hamano Fri, 6 Feb 2009 01:52:22 +0000 (17:52 -0800)

Merge branch 'kc/maint-diff-bwi-fix' into maint

* kc/maint-diff-bwi-fix:
Fix combined use of whitespace ignore options to diff
test more combinations of ignore-whitespace options to diff

filter-branch: do not consider diverging submodules... Johannes Schindelin Thu, 5 Feb 2009 18:19:33 +0000 (19:19 +0100)

filter-branch: do not consider diverging submodules a 'dirty worktree'

At the end of filter-branch in a non-bare repository, the work tree is
updated with "read-tree -m -u HEAD", to carry the change forward in case
the current branch was rewritten. In order to avoid losing any local
change during this step, filter-branch refuses to work when there are
local changes in the work tree.

This "read-tree -m -u HEAD" operation does not affect what commit is
checked out in a submodule (iow, it does not touch .git/HEAD in a
submodule checkout), and checking if there is any local change to the
submodule is not useful.

Staged submodules _are_ considered to be 'dirty', however, as the
"read-tree -m -u HEAD" could result in loss of staged information
otherwise.

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

Fixed broken git help -w when installing from RPMDavid J. Mellor Thu, 5 Feb 2009 04:14:29 +0000 (20:14 -0800)

Fixed broken git help -w when installing from RPM

After the git-core package was renamed to git, git help -w was still looking
for files in /usr/share/doc/git-core-$VERSION instead of
/usr/share/doc/git-$VERSION.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-blame.c: Use utf8_strwidth for author's namesGeoffrey Thomas Fri, 30 Jan 2009 09:41:29 +0000 (04:41 -0500)

builtin-blame.c: Use utf8_strwidth for author's names

git blame misaligns output if a author's name has a differing display width and
strlen; for instance, an accented Latin letter that takes two bytes to encode
will cause the rest of the line to be shifted to the left by one. To fix this,
use utf8_strwidth instead of strlen (and compute the padding ourselves, since
printf doesn't know about UTF-8).

Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

utf8: add utf8_strwidth()Geoffrey Thomas Fri, 30 Jan 2009 09:41:28 +0000 (04:41 -0500)

utf8: add utf8_strwidth()

I'm about to use this pattern more than once, so make it a common function.

Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>