gitweb.git
pack-objects: don't loosen objects available in alterna... Brandon Casey Sat, 21 Mar 2009 22:26:11 +0000 (17:26 -0500)

pack-objects: don't loosen objects available in alternate or kept packs

If pack-objects is called with the --unpack-unreachable option then it
will unpack (i.e. loosen) all unreferenced objects from local not-kept
packs, including those that also exist in packs residing in an alternate
object database or a locally kept pack. The only user of this option is
git-repack.

In this case, repack will follow the call to pack-objects with a call to
prune-packed, which will delete these newly loosened objects, making the
act of loosening a waste of time. The unnecessary loosening can be
avoided by checking whether an object exists in a non-local pack or a
locally kept pack before loosening it.

This fixes the 'local packed unreachable obs that exist in alternate ODB
are not loosened' test in t7700.

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

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>

t7700: demonstrate repack flaw which may loosen objects... Brandon Casey Sat, 21 Mar 2009 22:25:30 +0000 (17:25 -0500)

t7700: demonstrate repack flaw which may loosen objects unnecessarily

If an unreferenced object exists in both a local pack and in either a pack
residing in an alternate object database or a local kept pack, then the
pack-objects call made by repack will loosen that object only to have it
immediately pruned by repack's call to prune-packed.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
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>

Remove --kept-pack-only option and associated infrastru... Brandon Casey Fri, 20 Mar 2009 03:47:54 +0000 (22:47 -0500)

Remove --kept-pack-only option and associated infrastructure

This option to pack-objects/rev-list was created to improve the -A and -a
options of repack. It was found to be lacking in that it did not provide
the ability to differentiate between local and non-local kept packs, and
found to be unnecessary since objects residing in local kept packs can be
filtered out by the --honor-pack-keep option.

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

pack-objects: only repack or loosen objects residing... Brandon Casey Fri, 20 Mar 2009 03:47:52 +0000 (22:47 -0500)

pack-objects: only repack or loosen objects residing in "local" packs

These two features were invented for use by repack when repack will delete
the local packs that have been made redundant. The packs accessible
through alternates are not deleted by repack, so the objects contained in
them are still accessible after the local packs are deleted. They do not
need to be repacked into the new pack or loosened. For the case of
loosening they would immediately be deleted by the subsequent prune-packed
that is called by repack anyway.

This fixes the test
'packed unreachable obs in alternate ODB are not loosened' in t7700.

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

git-repack.sh: don't use --kept-pack-only option to... Brandon Casey Fri, 20 Mar 2009 03:47:51 +0000 (22:47 -0500)

git-repack.sh: don't use --kept-pack-only option to pack-objects

The --kept-pack-only option to pack-objects treats all kept packs as equal.
This results in objects that reside in an alternate pack that has a .keep
file, not being packed into a newly created pack when the user specifies the
-a option to repack. Since the user may not have any control over the
alternate database, git should not refrain from repacking those objects
even though they are in a pack with a .keep file.

This fixes the 'packed obs in alternate ODB kept pack are repacked' test in
t7700.

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

t7700-repack: add two new tests demonstrating repacking... Brandon Casey Fri, 20 Mar 2009 03:47:50 +0000 (22:47 -0500)

t7700-repack: add two new tests demonstrating repacking flaws

1) The new --kept-pack-only mechansim of rev-list/pack-objects has
replaced --unpacked=. This new mechansim does not operate solely on
"local" packs now. The result is that objects residing in an alternate
pack which has a .keep file will not be repacked with repack -a.

This flaw is only apparent when a commit object is the one residing in
an alternate kept pack.

2) The 'repack unpacked objects' and 'loosen unpacked objects' mechanisms
of pack-objects, i.e. --keep-unreachable and --unpack-unreachable,
now do not operate solely on local packs. The --keep-unreachable
option no longer has any callers, but --unpack-unreachable is used when
repack is called with '-A -d' and the local repo has existing packs.
In this case, objects residing in alternate, not-kept packs will be
loosened, and then immediately deleted by repack's call to
prune-packed.

The test must manually call pack-objects to avoid the call to
prune-packed that is made by repack when -d is used.

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

Documentation: reword example text in git-bisect.txt.David J. Mellor Fri, 20 Mar 2009 03:35:34 +0000 (20:35 -0700)

Documentation: reword example text in git-bisect.txt.

Avoid splitting sentences across examples of command usage.

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

doc: clarify how -S worksJeff King Tue, 3 Mar 2009 15:40:41 +0000 (10:40 -0500)

doc: clarify how -S works

The existing text was very vague about what exactly it means
for difference to "contain" a change. This seems to cause
confusion on the mailing list every month or two.

To fix it we:

1. use "introduce or remove an instance of" instead of
"contain"

2. point the user to gitdiffcore(7), which contains a more
complete explanation

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

Documentation: reworded the "Description" section of... David J. Mellor Thu, 19 Mar 2009 07:00:12 +0000 (00:00 -0700)

Documentation: reworded the "Description" section of git-bisect.txt.

Added fixes missing from 2364259.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.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>

Documentation: minor grammatical fixes in git-branch... David J. Mellor Tue, 17 Mar 2009 06:16:17 +0000 (23:16 -0700)

Documentation: minor grammatical fixes in git-branch.txt.

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

Documentation: minor grammatical fixes in git-blame... David J. Mellor Tue, 17 Mar 2009 06:16:16 +0000 (23:16 -0700)

Documentation: minor grammatical fixes in git-blame.txt.

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

Documentation: reword the "Description" section of... David J. Mellor Tue, 17 Mar 2009 06:16:15 +0000 (23:16 -0700)

Documentation: reword the "Description" section of git-bisect.txt.

Reword this section to make it less chatty. Also make minor grammatical
fixes.

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

Documentation: minor grammatical fixes in git-archive... David J. Mellor Tue, 17 Mar 2009 06:16:14 +0000 (23:16 -0700)

Documentation: minor grammatical fixes in git-archive.txt.

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

Remove total confusion from git-fetch and git-pushJunio C Hamano Mon, 16 Mar 2009 07:35:09 +0000 (00:35 -0700)

Remove total confusion from git-fetch and git-push

The config file is not the only place remotes are defined, and without
consulting .git/remotes and .git/branches, you won't know if "origin" is
configured by the user. Don't give up too early and insult the user with
a wisecrack "Where do you want to fetch from today?"

The only thing the previous patch seems to want to prevent from happening
is a lazy "git fetch/push" that does not say where-from/to to produce an
error message 'origin not found', and we can do that by not letting
add_url_alias() to turn a nickname "origin" literally into a pathname
"origin" without changing the rest of the logic.

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

GIT 1.6.2.1 v1.6.2.1Junio C Hamano Sun, 15 Mar 2009 20:03:19 +0000 (13:03 -0700)

GIT 1.6.2.1

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

Merge branch 'maint-1.6.1' into maintJunio C Hamano Fri, 13 Mar 2009 06:37:16 +0000 (23:37 -0700)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:

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

read-tree A B C: do not create a bogus index and do... Junio C Hamano Thu, 12 Mar 2009 07:02:12 +0000 (00:02 -0700)

read-tree A B C: do not create a bogus index and do not segfault

"git read-tree A B C..." without the "-m" (merge) option is a way to read
these trees on top of each other to get an overlay of them.

An ancient commit ee6566e (Rewrite read-tree, 2005-09-05) passed the
ADD_CACHE_SKIP_DFCHECK flag when calling add_index_entry() to add the
paths obtained from these trees to the index, but it is an incorrect use
of the flag. The flag is meant to be used by callers who know the
addition of the entry does not introduce a D/F conflict to the index in
order to avoid the overhead of checking.

This bug resulted in a bogus index that records both "x" and "x/z" as a
blob after reading three trees that have paths ("x"), ("x", "y"), and
("x/z", "y") respectively. 34110cd (Make 'unpack_trees()' have a separate
source and destination index, 2008-03-06) refactored the callsites of
add_index_entry() incorrectly and added more codepaths that use this flag
when it shouldn't be used.

Also, 0190457 (Move 'unpack_trees()' over to 'traverse_trees()' interface,
2008-03-05) introduced a bug to call add_index_entry() for the tree that
does not have the path in it, passing NULL as a cache entry. This caused
reading multiple trees, one of which has path "x" but another doesn't, to
segfault.

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

send-email: test --no-thread --in-reply-to combinationThomas Rast Wed, 11 Mar 2009 22:40:13 +0000 (23:40 +0100)

send-email: test --no-thread --in-reply-to combination

3e0c4ff (send-email: respect in-reply-to regardless of threading,
2009-03-01) fixed the handling of the In-Reply-To header when both
--no-thread and --in-reply-to are in effect. Add a test for it.

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

Update draft release notes for 1.6.2.1Junio C Hamano Wed, 11 Mar 2009 21:37:15 +0000 (14:37 -0700)

Update draft release notes for 1.6.2.1

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

Merge branch 'js/maint-send-email' into maintJunio C Hamano Wed, 11 Mar 2009 21:01:24 +0000 (14:01 -0700)

Merge branch 'js/maint-send-email' into maint

* js/maint-send-email:
send-email: don't create temporary compose file until it is needed
send-email: --suppress-cc improvements
send-email: handle multiple Cc addresses when reading mbox message
send-email: allow send-email to run outside a repo

Merge branch 'jk/sane-relative-time' into maintJunio C Hamano Wed, 11 Mar 2009 20:59:38 +0000 (13:59 -0700)

Merge branch 'jk/sane-relative-time' into maint

* jk/sane-relative-time:
never fallback relative times to absolute

Merge branch 'jc/maint-add-p-unquote' into maintJunio C Hamano Wed, 11 Mar 2009 20:55:49 +0000 (13:55 -0700)

Merge branch 'jc/maint-add-p-unquote' into maint

* jc/maint-add-p-unquote:
git-add -i/-p: learn to unwrap C-quoted paths

Merge branch 'fg/maint-exclude-bq' into maintJunio C Hamano Wed, 11 Mar 2009 20:53:53 +0000 (13:53 -0700)

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

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

Merge branch 'en/maint-hash-object' into maintJunio C Hamano Wed, 11 Mar 2009 20:51:59 +0000 (13:51 -0700)

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

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

Conflicts:
hash-object.c

rsync transport: allow local paths, and fix testsJohannes Schindelin Mon, 9 Mar 2009 18:44:55 +0000 (19:44 +0100)

rsync transport: allow local paths, and fix tests

Earlier, the rsync tests were disabled by default, as they needed a
running rsyncd daemon. This was only due to the limitation that our
rsync transport only allowed full URLs of the form

rsync://<host>/<path>

Relaxing the URLs to allow

rsync:<path>

permitted the change in the tests to run whenever rsync is available,
without requiring a fully configured and running rsyncd.

While at it, the tests were fixed so that they run in directories with a
space in their name.

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

Give error when no remote is configuredDaniel Barkalow Wed, 11 Mar 2009 05:47:20 +0000 (01:47 -0400)

Give error when no remote is configured

When there's no explicitly-named remote, we use the remote specified
for the current branch, which in turn defaults to "origin". But it
this case should require the remote to actually be configured, and not
fall back to the path "origin".

Possibly, the config file's "remote = something" should require the
something to be a configured remote instead of a bare repository URL,
but we actually test with a bare repository URL.

In fetch, we were giving the sensible error message when coming up
with a URL failed, but this wasn't actually reachable, so move that
error up and use it when appropriate.

In push, we need a new error message, because the old one (formerly
unreachable without a lot of help) used the repo name, which was NULL.

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

Merge branch 'maint-1.6.1' into maintJunio C Hamano Sun, 8 Mar 2009 05:00:27 +0000 (21:00 -0800)

Merge branch 'maint-1.6.1' into maint

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

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>

document config --bool-or-intJeff King Sat, 7 Mar 2009 17:14:06 +0000 (12:14 -0500)

document config --bool-or-int

The documentation is just a pointer to the --bool and --int
options, but it makes sense to at least mention that it
exists.

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

t1300: use test_must_fail as appropriateJeff King Sat, 7 Mar 2009 17:14:04 +0000 (12:14 -0500)

t1300: use test_must_fail as appropriate

Some of the tests checked the exit code manually, even going
so far as to run git outside of the test_expect harness.

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

cleanup: add isascii()René Scharfe Sat, 7 Mar 2009 13:06:49 +0000 (14:06 +0100)

cleanup: add isascii()

Add a standard definition of isascii() and use it to replace an open
coded high-bit test in pretty.c. While we're there, write the ESC
char as the more commonly used '\033' instead of as 0x1b to enhance
its grepability.

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

Documentation: fix badly indented paragraphs in "-... Christian Couder Sat, 7 Mar 2009 12:37:24 +0000 (13:37 +0100)

Documentation: fix badly indented paragraphs in "--bisect-all" description

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

Make the 'lock file' exists error more informativeJohn Tapsell Wed, 4 Mar 2009 15:00:44 +0000 (15:00 +0000)

Make the 'lock file' exists error more informative

It looks like someone did 90% of the work, then forgot to actually use
the function in one place.

Also the helper function did not use the correct variable.

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

Beginning of 1.6.2 maintenance trackJunio C Hamano Wed, 4 Mar 2009 08:37:50 +0000 (00:37 -0800)

Beginning of 1.6.2 maintenance track

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

GIT 1.6.2 v1.6.2Junio C Hamano Wed, 4 Mar 2009 07:02:16 +0000 (23:02 -0800)

GIT 1.6.2

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

git submodule: Fix adding of submodules at paths with... Michael J Gruber Tue, 3 Mar 2009 15:08:21 +0000 (16:08 +0100)

git submodule: Fix adding of submodules at paths with ./, .. and //

Make 'git submodule add' normalize the submodule path in the
same way as 'git ls-files' does, so that 'git submodule init' looks up
the information in .gitmodules with the same key under which 'git
submodule add' stores it.

This fixes 4 known breakages.

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

git submodule: Add test cases for git submodule addMichael J Gruber Tue, 3 Mar 2009 15:08:20 +0000 (16:08 +0100)

git submodule: Add test cases for git submodule add

Add simple test cases for adding and initialising submodules. The
init step is necessary in order to verify the added information.

The second test exposes a known breakage due to './' in the path: git
ls-files simplifies the path but git add does not, which leads to git
init looking for different lines in .gitmodules than git add adds.

The other tests add test cases for '//' and '..' in the path which
currently fail for the same reason.

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

Documentation: Typo / spelling / formatting fixesMike Ralphson Tue, 3 Mar 2009 19:29:22 +0000 (19:29 +0000)

Documentation: Typo / spelling / formatting fixes

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

Documentation: Expand a couple of abbreviationsMike Ralphson Tue, 3 Mar 2009 19:29:21 +0000 (19:29 +0000)

Documentation: Expand a couple of abbreviations

These may not be obvious to non-native English speakers

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

Documentation: Typos / spelling fixes in RelNotesMike Ralphson Tue, 3 Mar 2009 19:29:20 +0000 (19:29 +0000)

Documentation: Typos / spelling fixes in RelNotes

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

Documentation/git-archive.txt: Note attributesRoy Lee Tue, 3 Mar 2009 16:49:29 +0000 (00:49 +0800)

Documentation/git-archive.txt: Note attributes

Signed-off-by: Roy Lee <roylee17@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: respect in-reply-to regardless of threadingThomas Rast Sun, 1 Mar 2009 22:45:41 +0000 (23:45 +0100)

send-email: respect in-reply-to regardless of threading

git-send-email supports the --in-reply-to option even with
--no-thread. However, the code that adds the relevant mail headers
was guarded by a test for --thread.

Remove the test, so that the user's choice is respected.

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

optimize compat/ memmem()René Scharfe Mon, 2 Mar 2009 23:19:30 +0000 (00:19 +0100)

optimize compat/ memmem()

When memmem() was imported from glibc 2.2 into compat/, an optimization
was dropped in the process, in order to make the code smaller and simpler.
It was OK because memmem() wasn't used in performance-critical code. Now
the situation has changed and we can benefit from this optimization.

The trick is to avoid calling memcmp() if the first character of the needle
already doesn't match. Checking one character directly is much cheaper
than the function call overhead. We keep the first character of the needle
in the variable named point and the rest in the one named tail.

The following commands were run in a Linux kernel repository and timed, the
best of five results is shown:

$ STRING='Ensure that the real time constraints are schedulable.'
$ git log -S"$STRING" HEAD -- kernel/sched.c >/dev/null

On Windows Vista x64, before:

real 0m8.470s
user 0m0.000s
sys 0m0.000s

And after the patch:

real 0m1.887s
user 0m0.000s
sys 0m0.000s

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

diffcore-pickaxe: use memmem()René Scharfe Mon, 2 Mar 2009 23:00:55 +0000 (00:00 +0100)

diffcore-pickaxe: use memmem()

Use memmem() instead of open-coding it. The system libraries usually have a
much faster version than the memcmp()-loop here. Even our own fall-back in
compat/, which is used on Windows, is slightly faster.

The following commands were run in a Linux kernel repository and timed, the
best of five results is shown:

$ STRING='Ensure that the real time constraints are schedulable.'
$ git log -S"$STRING" HEAD -- kernel/sched.c >/dev/null

On Ubuntu 8.10 x64, before (v1.6.2-rc2):

8.09user 0.04system 0:08.14elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+30952minor)pagefaults 0swaps

And with the patch:

1.50user 0.04system 0:01.54elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+30645minor)pagefaults 0swaps

On Fedora 10 x64, before:

8.34user 0.05system 0:08.39elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+29268minor)pagefaults 0swaps

And with the patch:

1.15user 0.05system 0:01.20elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+32253minor)pagefaults 0swaps

On Windows Vista x64, before:

real 0m9.204s
user 0m0.000s
sys 0m0.000s

And with the patch:

real 0m8.470s
user 0m0.000s
sys 0m0.000s

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

Documentation: minor grammatical fixes.David J. Mellor Mon, 2 Mar 2009 06:42:44 +0000 (22:42 -0800)

Documentation: minor grammatical fixes.

The final hunk in this patch corrects what appears to be a typo:

of --> or

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

Documentation: minor grammatical fixes.David J. Mellor Mon, 2 Mar 2009 06:38:36 +0000 (22:38 -0800)

Documentation: minor grammatical fixes.

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

Documentation: minor grammatical fixes.David J. Mellor Mon, 2 Mar 2009 06:37:41 +0000 (22:37 -0800)

Documentation: minor grammatical fixes.

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

t3400-rebase: Move detached HEAD check earlierJohannes Sixt Sun, 1 Mar 2009 10:20:03 +0000 (11:20 +0100)

t3400-rebase: Move detached HEAD check earlier

Short story: There is a section in t3400 that tests fundamental rebase
properties. 3ec7371f (Add two extra tests for git rebase, 2009-02-09)
added a check that rebase works on a detached HEAD, but the test was put
near the end of the file. This moves it to a more suitable place.

Long story: The test that preceded the one in question tests that a
rebased commit degrades from a content change with mode change to a
mere mode change. But on Windows, where we have core.filemode=false,
the original commit did not record the mode change, and so the rebase
operation did not rebase anything. This caused the subsequent detached
HEAD test to fail.

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

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Mon, 2 Mar 2009 06:20:52 +0000 (22:20 -0800)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Fix possible infinite loop and display corruption

gitk: Fix possible infinite loop and display corruptionPaul Mackerras Sun, 1 Mar 2009 22:38:17 +0000 (09:38 +1100)

gitk: Fix possible infinite loop and display corruption

This fixes an issue reported by Johannes Sixt on the git mailing list:

> This recipe sends gitk into an endless loop. In git.git do:
>
> cd t
> # remove chmod a+x A near the end of the file
> sed -i 's/chmod/: chmod/' t3400-rebase.sh
> sh t3400-rebase.sh --debug
> cd trash\ directory.t3400-rebase/
> gitk master modechange modechange@{1}
>
>
> I briefly see the history chart, but the dot that should be modechange@{1}
> is missing. One automatically selected commit is shown in the diff section
> below. But then the commit list is cleared and gitk goes into an infinite
> loop.
>
> Things work alright if either modechange@{1} is dropped, or the 'chmod'
> line is left unchanged, which is a bit strange.
>
> This is with git version 1.6.1.2.390.gba743

There were actually two problems. This recipe created a situation where
git log would output a child commit after its parent. This meant that
we called fix_reversal which called splitvarc, which should call modify_arc
to note the fact that it has modified the arc that it has just split. It
wasn't, which meant that displayorder and other variables got into an
inconsistent state (a commit appearing twice in displayorder).

This then meant that the targetrow/targetid logic in drawvisible thought
it need to redraw each time. That, together with the fact that drawvisible
called drawcommits which called drawvisible if a redraw was needed, led
to the infinite loop.

In fact drawvisible is now the only caller of drawcommits. Thus, the
start and end row arguments to drawcommits always encompass the whole
visible area, so drawcommits doesn't need to call drawvisible to redraw;
it just needs to clear the screen and draw what it's been asked to.

This fixes these two problems by adding a call to modify_arc in
splitvarc and by taking out the call to drawvisible in drawcommits.
It also removes an unrelated left-over debugging puts in external_blame.

Signed-off-by: Paul Mackerras <paulus@samba.org>

Merge branch 'jc/maint-1.6.0-pack-directory'Junio C Hamano Sun, 1 Mar 2009 00:31:02 +0000 (16:31 -0800)

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

* jc/maint-1.6.0-pack-directory:
Fix odb_mkstemp() on AIX

Merge branch 'maint'Junio C Hamano Sat, 28 Feb 2009 22:39:56 +0000 (14:39 -0800)

Merge branch 'maint'

* maint:
Documentation: minor grammatical fixes.
added missing backtick in git-apply.txt

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>

git-rebase: Update --whitespace documentationTodd Zullinger Sat, 28 Feb 2009 18:42:02 +0000 (13:42 -0500)

git-rebase: Update --whitespace documentation

The parameters accepted by the --whitespace option of "git apply" have
changed over time, and the documentation for "git rebase" was out of
sync. Remove the specific parameter list from the "git rebase"
documentation and simply point to the "git apply" documentation for
details, as is already done in the "git am" documentation.

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

is_kept_pack(): final clean-upJunio C Hamano Sat, 28 Feb 2009 08:37:19 +0000 (00:37 -0800)

is_kept_pack(): final clean-up

Now is_kept_pack() is just a member lookup into a structure, we can write
it as such.

Also rewrite the sole caller of has_sha1_kept_pack() to switch on the
criteria the callee uses (namely, revs->kept_pack_only) between calling
has_sha1_kept_pack() and has_sha1_pack(), so that these two callees do not
have to take a pointer to struct rev_info as an argument.

This removes the header file dependency issue temporarily introduced by
the earlier commit, so we revert changes associated to that as well.

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

Simplify is_kept_pack()Junio C Hamano Sat, 28 Feb 2009 08:00:21 +0000 (00:00 -0800)

Simplify is_kept_pack()

This removes --unpacked=<packfile> parameter from the revision parser, and
rewrites its use in git-repack to pass a single --kept-pack-only option
instead.

The new --kept-pack-only option means just that. When this option is
given, is_kept_pack() that used to say "not on the --unpacked=<packfile>
list" now says "the packfile has corresponding .keep file".

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

Consolidate ignore_packed logic moreJunio C Hamano Sat, 28 Feb 2009 07:43:37 +0000 (23:43 -0800)

Consolidate ignore_packed logic more

This refactors three loops that check if a given packfile is on the
ignore_packed list into a function is_kept_pack(). The function returns
false for a pack on the list, and true for a pack not on the list, because
this list is solely used by "git repack" to pass list of packfiles that do
not have corresponding .keep files, i.e. a packfile not on the list is
"kept".

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

has_sha1_kept_pack(): take "struct rev_info"Junio C Hamano Sat, 28 Feb 2009 07:30:38 +0000 (23:30 -0800)

has_sha1_kept_pack(): take "struct rev_info"

Its "ignore_packed" parameter always comes from struct rev_info. This
patch makes the function take a pointer to the surrounding structure, so
that the refactoring in the next patch becomes easier to review.

There is an unfortunate header file dependency and the easiest workaround
is to temporarily move the function declaration from cache.h to
revision.h; this will be moved back to cache.h once the function loses
this "ignore_packed" parameter altogether in the later part of the
series.

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

has_sha1_pack(): refactor "pretend these packs do not... Junio C Hamano Sat, 28 Feb 2009 07:15:53 +0000 (23:15 -0800)

has_sha1_pack(): refactor "pretend these packs do not exist" interface

Most of the callers of this function except only one pass NULL to its last
parameter, ignore_packed.

Introduce has_sha1_kept_pack() function that has the function signature
and the semantics of this function, and convert the sole caller that does
not pass NULL to call this new function.

All other callers and has_sha1_pack() lose the ignore_packed parameter.

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

git-repack: resist stray environment variableJunio C Hamano Sat, 28 Feb 2009 07:58:50 +0000 (23:58 -0800)

git-repack: resist stray environment variable

The script used $args and $existing without initializing it to empty. It
would have been confused by an environment variable the end user had
before running it.

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

git-svn - return original format_svn_date semanticsBen Walton Sat, 28 Feb 2009 03:11:45 +0000 (22:11 -0500)

git-svn - return original format_svn_date semantics

When %z was removed from the strftime call and subsituted with a
local gmt offset calculation, time() was no longer the default for
all time functions as it was with the previous localtime(shift).
This is now corrected so that format_svn_time behaves as it used to.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: disable broken symlink workaround by defaultEric Wong Sat, 28 Feb 2009 03:40:16 +0000 (19:40 -0800)

git-svn: disable broken symlink workaround by default

Even though this will break things for some extremely rare repositories
used by broken Windows clients, it's probably not worth enabling this by
default as it has negatively affected many more users than it has helped
from what we've seen so far.

The extremely rare repositories that have broken symlinks in them will be
silently corrupted in import; but users can still reenable this option and
restart the import.

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

Merge branch 'cc/maint-1.6.0-bisect-fix'Junio C Hamano Sat, 28 Feb 2009 00:00:33 +0000 (16:00 -0800)

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

* cc/maint-1.6.0-bisect-fix:
bisect: fix another instance of eval'ed string

Conflicts:
git-bisect.sh

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>

Merge branch 'cc/maint-1.6.0-bisect-fix'Junio C Hamano Fri, 27 Feb 2009 09:03:21 +0000 (01:03 -0800)

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

* cc/maint-1.6.0-bisect-fix:
bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped

Conflicts:
git-bisect.sh

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>

git-am: make --abort less dangerousJunio C Hamano Thu, 26 Feb 2009 19:24:29 +0000 (11:24 -0800)

git-am: make --abort less dangerous

When you are in the middle of "git rebase", "git am --abort" by mistake
would have referred to nonexistent ORIG_HEAD and barfed, or worse yet, used
a stale ORIG_HEAD and taken you to an unexpected commit.

Also the option parsing did not reject "git am --abort --skip".

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

git-am: Keep index in case of abort with dirty indexMichael J Gruber Thu, 26 Feb 2009 09:52:53 +0000 (10:52 +0100)

git-am: Keep index in case of abort with dirty index

git am --abort resets the index unconditionally. But in case a previous
git am exited due to a dirty index it is preferable to keep that index.
Make it so.

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

t5540-http-push.sh: avoid non-portable grep -PJay Soffian Thu, 26 Feb 2009 23:44:40 +0000 (18:44 -0500)

t5540-http-push.sh: avoid non-portable grep -P

OS X's GNU grep does not support -P/--perl-regexp.

We use a basic RE instead, and simplify the pattern slightly by
replacing '+' with '*' so it can be more easily expressed using a basic
RE. The important part of pattern, checking for a SHA-1 has suffix in
the successful PUT/MOVE operations, remains the same. Also, a-z instead
of a-f was an obvious mistake in the original RE. Here are samples of
what we want to match:

127.0.0.1 - - [26/Feb/2009:22:38:13 +0000] "PUT /test_repo.git/objects/3e/a4fbb9e18a401a6463c595d08118fcb9fb7426_fab55116904c665a95438bcc78521444a7db6096 HTTP/1.1" 201 277
127.0.0.1 - - [26/Feb/2009:22:38:13 +0000] "MOVE /test_repo.git/objects/3e/a4fbb9e18a401a6463c595d08118fcb9fb7426_fab55116904c665a95438bcc78521444a7db6096 HTTP/1.1" 201 277

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
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>

GIT 1.6.2-rc2 v1.6.2-rc2Junio C Hamano Wed, 25 Feb 2009 22:50:52 +0000 (14:50 -0800)

GIT 1.6.2-rc2

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

Merge branch 'jc/maint-1.6.0-pack-directory'Junio C Hamano Wed, 25 Feb 2009 22:48:30 +0000 (14:48 -0800)

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

* jc/maint-1.6.0-pack-directory:
Make sure objects/pack exists before creating a new pack

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>

Allow HTTP tests to run on DarwinJay Soffian Wed, 25 Feb 2009 08:28:15 +0000 (03:28 -0500)

Allow HTTP tests to run on Darwin

This patch allows the HTTP tests to run on OS X 10.5. It is not
sufficient to be able to pass in LIB_HTTPD_PATH and
LIB_HTTPD_MODULE_PATH alone, as the apache.conf also needs a couple
tweaks.

These changes are put into an <IfDefine> to keep them Darwin specific,
but this means lib-httpd.sh needs to be modified to pass -DDarwin to
apache when running on Darwin. As long as we're making this change to
lib-httpd.sh, we may as well set LIB_HTTPD_PATH and
LIB_HTTPD_MODULE_PATH to appropriate default values for the platform.

Note that we now pass HTTPD_PARA to apache at shutdown as well.
Otherwise apache will emit a harmless, but noisy warning that LogFormat
is an unknown directive.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix typo in contrib/examples/git-svnimport.txtMichael J Gruber Wed, 25 Feb 2009 14:05:17 +0000 (15:05 +0100)

Fix typo in contrib/examples/git-svnimport.txt

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

gitattributes.txt: Path matching rules are explained... Johannes Sixt Wed, 25 Feb 2009 07:54:42 +0000 (08:54 +0100)

gitattributes.txt: Path matching rules are explained in gitignore.txt

The rules how the patterns are matched against path names are the same
for .gitattribute and .gitignore files.

This also replace the notion "glob pattern" by "pattern" because
gitignore.txt talks about "glob" only in some contexts where the pattern
is mentioned.

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

sha1_file.c: fix typoFelipe Contreras Tue, 24 Feb 2009 21:59:05 +0000 (23:59 +0200)

sha1_file.c: fix typo

it's != its

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git add: trivial codestyle cleanupFelipe Contreras Tue, 24 Feb 2009 21:59:03 +0000 (23:59 +0200)

git add: trivial codestyle cleanup

Global static variables don't need to be initialized to 0/NULL.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

README: fix path to "gitcvs-migration.txt" and be more... Christian Couder Tue, 24 Feb 2009 20:16:37 +0000 (21:16 +0100)

README: fix path to "gitcvs-migration.txt" and be more consistent

README suggested to look at "Documentation/gittutorial.txt" for the
tutorial and to use "man git-commandname" for documentation of each
command.

This was not consistent because the tutorial can also be available with
"man gittutorial" once git is installed, and the documentation for each
command can be available at "Documentation/git-commandname.txt" before
installing git.

This patch tries to make the description more consistent. It also fixes
the path to the cvs-migration documentation that changed from
"Documentation/cvs-migration.txt" to "Documentation/gitcvs-migration.txt".

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