gitweb.git
Update my e-mail addressJunio C Hamano Mon, 21 Jul 2008 19:14:42 +0000 (12:14 -0700)

Update my e-mail address

The old cox.net address is still getting mails from gitters.

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

git-diff(1): "--c" -> "--cc" typo fixJonathan Nieder Mon, 21 Jul 2008 18:34:06 +0000 (13:34 -0500)

git-diff(1): "--c" -> "--cc" typo fix

git diff does not take a --c option.

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

git-submodule: move ill placed shift.Pierre Habouzit Mon, 21 Jul 2008 18:15:59 +0000 (20:15 +0200)

git-submodule: move ill placed shift.

When running git submodule update -i, the "-i" is shifted before recursing
into cmd_init and then again outside of the loop. This causes some /bin/sh
to complain about shifting when there are no arguments left (and would
discard anything written after -i too).

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t4202-log.sh: add newline at end of fileBrandon Casey Tue, 22 Jul 2008 21:23:31 +0000 (16:23 -0500)

t/t4202-log.sh: add newline at end of file

Some shells hang when parsing the script if the last statement is not
followed by a newline. So add one.

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

sort_in_topological_order(): avoid setting a commit... Johannes Schindelin Wed, 23 Jul 2008 00:51:36 +0000 (01:51 +0100)

sort_in_topological_order(): avoid setting a commit flag

We used to set the TOPOSORT flag of commits during the topological
sorting, but we can just as well use the member "indegree" for it:
indegree is now incremented by 1 in the cases where the commit used
to have the TOPOSORT flag.

This is the same behavior as before, since indegree could not be
non-zero when TOPOSORT was unset.

Incidentally, this fixes the bug in show-branch where the 8th column
was not shown: show-branch sorts the commits in topological order,
assuming that all the commit flags are available for show-branch's
private matters.

But this was not true: TOPOSORT was identical to the flag corresponding
to the 8th ref. So the flags for the 8th column were unset by the
topological sorting.

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

Documentation: clarify diff --ccJunio C Hamano Wed, 23 Jul 2008 23:16:05 +0000 (16:16 -0700)

Documentation: clarify diff --cc

The definition of an "uninteresting" hunk was not in line with reality.

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

Propagate -u/--upload-pack option of "git clone" to... Steve Haslam Fri, 25 Jul 2008 17:51:51 +0000 (18:51 +0100)

Propagate -u/--upload-pack option of "git clone" to transport.

The -u option to override the remote system's path to git-upload-pack was
being ignored by "git clone"; caused by a missing call to
transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in
when git-clone was converted from shell to C.

Signed-off-by: Steve Haslam <shaslam@lastminute.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: fix diff.external exampleAnders Melchiorsen Sun, 27 Jul 2008 11:12:15 +0000 (13:12 +0200)

Documentation: fix diff.external example

The diff.external examples pass a flag to gnu-diff, but GNU diff
does not follow the GIT_EXTERNAL_DIFF interface.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

make sure parsed wildcard refspec ends with slashJunio C Hamano Sun, 27 Jul 2008 06:15:51 +0000 (23:15 -0700)

make sure parsed wildcard refspec ends with slash

A wildcard refspec is internally parsed into a refspec structure with src
and dst strings. Many parts of the code assumed that these do not include
the trailing "/*" when matching the wildcard pattern with an actual ref we
see at the remote. What this meant was that we needed to make sure not
just that the prefix matched, and also that a slash followed the part that
matched.

But a codepath that scans the result from ls-remote and finds matching
refs forgot to check the "matching part must be followed by a slash" rule.
This resulted in "refs/heads/b1" from the remote side to mistakenly match
the source side of "refs/heads/b/*:refs/remotes/b/*" refspec.

Worse, the refspec crafted internally by "git-clone", and a hardcoded
preparsed refspec that is used to implement "git-fetch --tags", violated
this "parsed widcard refspec does not end with slash" rule; simply adding
the "matching part must be followed by a slash" rule then would have
broken codepaths that use these refspecs.

This commit changes the rule to require a trailing slash to parsed
wildcard refspecs. IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as
src = "refs/heads/b/" and dst = "refs/remotes/b/". This allows us to
simplify the matching logic because we only need to do a prefixcmp() to
notice "refs/heads/b/one" matches and "refs/heads/b1" does not.

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

init: handle empty "template" parameterJeff King Mon, 28 Jul 2008 06:02:04 +0000 (02:02 -0400)

init: handle empty "template" parameter

If a user passes "--template=", then our template parameter
is blank. Unfortunately, copy_templates() assumes it has at
least one character, and does all sorts of bad things like
reading from template[-1] and then proceeding to link all of
'/' into the .git directory.

This patch just checks for that condition in copy_templates
and aborts. As a side effect, this means that --template=
now has the meaning "don't copy any templates."

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

builtin-revert.c: typofixStephan Beyer Sat, 2 Aug 2008 01:51:21 +0000 (03:51 +0200)

builtin-revert.c: typofix

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: fix shell quotingJunio C Hamano Fri, 25 Jul 2008 19:35:10 +0000 (12:35 -0700)

Makefile: fix shell quoting

Makefile records paths to a few programs in GIT-BUILD-OPTIONS file. These
paths need to be quoted twice: once to protect specials from the shell
that runs the generated GIT-BUILD-OPTIONS file, and again to protect them
(and the first level of quoting itself) from the shell that runs the
"echo" inside the Makefile.

You can test this by trying:

$ ln -s /bin/tar "$HOME/Tes' program/tar"
$ make TAR="$HOME/Tes' program/tar" test

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

tests: propagate $(TAR) down from the toplevel MakefileJunio C Hamano Fri, 25 Jul 2008 18:09:48 +0000 (11:09 -0700)

tests: propagate $(TAR) down from the toplevel Makefile

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

index-pack.c: correctly initialize appended objectsBjörn Steinbrink Thu, 24 Jul 2008 17:32:00 +0000 (18:32 +0100)

index-pack.c: correctly initialize appended objects

When index-pack completes a thin pack it appends objects to the pack.
Since the commit 92392b4(index-pack: Honor core.deltaBaseCacheLimit when
resolving deltas) such an object can be pruned in case of memory
pressure, and will be read back again by get_data_from_pack(). For this
to work, the fields in object_entry structure need to be initialized
properly.

Noticed by Pierre Habouzit.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: find body-encoding correctlyPeter Valdemar Mørch Fri, 25 Jul 2008 13:06:48 +0000 (15:06 +0200)

send-email: find body-encoding correctly

In 8291db6 (git-send-email: add charset header if we add encoded 'From',
2007-11-16), "$1" is used from a regexp without using () to capture
anything in $1. Later, when that value was used, it causes a warning about
a variable being undefined, instead of using the correct value for
comparison (not that it makes difference in the current code that does not
do actual re-encoding).

Signed-off-by: Peter Valdemar Mørch <peter@morch.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-checkout: fix command line parsing.Pierre Habouzit Wed, 23 Jul 2008 10:15:32 +0000 (12:15 +0200)

git-checkout: fix command line parsing.

This fixes an issue when you use:

$ git checkout -- <path1> [<paths>...]

and that <path1> can also be understood as a reference. git-checkout
mistakenly understands this as the same as:

$ git checkout <path1> -- [<paths>...]

because parse-options was eating the '--' and the argument parser thought
he was parsing:

$ git checkout <path1> [<paths>...]

Where there indeed is an ambiguity

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix usage string for git grepJonathan Nieder Sun, 20 Jul 2008 19:13:08 +0000 (14:13 -0500)

fix usage string for git grep

Without this patch, git-grep gives confusing usage information:

$ git grep --confused
usage: git grep <option>* <rev>* [-e] <pattern> [<path>...]
$ git grep HEAD pattern
fatal: ambiguous argument 'pattern': unknown revision or path no
t in the working tree.
Use '--' to separate paths from revisions

So put <pattern> before the <rev>s, in accordance with actual correct
usage. While we're changing the usage string, we might as well include
the "--" separating revisions and paths, too.

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

refresh-index: fix bitmask assignmentJunio C Hamano Sun, 20 Jul 2008 06:25:00 +0000 (23:25 -0700)

refresh-index: fix bitmask assignment

5fdeacb (Teach update-index about --ignore-submodules, 2008-05-14) added a
new refresh option flag but did not assign a unique bit for it correctly,
and broke "update-index --ignore-missing".

This fixes it.

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

GIT 1.5.6.4 v1.5.6.4Junio C Hamano Sat, 19 Jul 2008 17:58:01 +0000 (10:58 -0700)

GIT 1.5.6.4

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

builtin-rm: fix index lock file pathOlivier Marin Sat, 19 Jul 2008 16:24:46 +0000 (18:24 +0200)

builtin-rm: fix index lock file path

When hold_locked_index() is called with a relative git_dir and you are
outside the work tree, the lock file become relative to the current
directory. So when later setup_work_tree() change the current directory
it breaks lock file path and commit_locked_index() fails.

This patch move index locking code after setup_work_tree() call to make
lock file relative to the working tree as it should be and add a test
case.

Noticed by Nick Andrew.

Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'sp/maint-index-pack' into maintJunio C Hamano Fri, 18 Jul 2008 22:39:51 +0000 (15:39 -0700)

Merge branch 'sp/maint-index-pack' into maint

* sp/maint-index-pack:
index-pack: Honor core.deltaBaseCacheLimit when resolving deltas
index-pack: Track the object_entry that creates each base_data
index-pack: Chain the struct base_data on the stack for traversal
index-pack: Refactor base arguments of resolve_delta into a struct

http-fetch: do not SEGV after fetching a bad pack idx... Junio C Hamano Fri, 18 Jul 2008 07:11:40 +0000 (00:11 -0700)

http-fetch: do not SEGV after fetching a bad pack idx file

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

rev-list: honor --quiet optionJunio C Hamano Fri, 18 Jul 2008 05:39:09 +0000 (22:39 -0700)

rev-list: honor --quiet option

Nick Andrew noticed that rev-list lets --quiet option to be parsed by
underlying diff_options parser but did not pick up the result. This
resulted in --quiet option to become effectively a no-op.

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

api-run-command.txt: typofixStephan Beyer Thu, 17 Jul 2008 23:53:55 +0000 (01:53 +0200)

api-run-command.txt: typofix

Replace "run_command_v_opt_dir" by "run_command_v_opt_cd".

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Start preparing 1.5.6.4 release notesJunio C Hamano Wed, 16 Jul 2008 22:55:51 +0000 (15:55 -0700)

Start preparing 1.5.6.4 release notes

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

git fetch-pack: do not complain about "no common commit... Johannes Schindelin Wed, 2 Jul 2008 17:06:56 +0000 (18:06 +0100)

git fetch-pack: do not complain about "no common commits" in an empty repo

If the repo is empty, it is obvious that there are no common commits
when fetching from _anywhere_.

So there is no use in saying it in that case, and it can even be
annoying. Therefore suppress the message unilaterally if the repository
is empty prior to the fetch.

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

Merge branch 'js/maint-pretty-mailmap' into maintJunio C Hamano Wed, 16 Jul 2008 22:27:03 +0000 (15:27 -0700)

Merge branch 'js/maint-pretty-mailmap' into maint

* js/maint-pretty-mailmap:
Add pretty format %aN which gives the author name, respecting .mailmap

Merge branch 'sp/maint-bash-completion-optim' into... Junio C Hamano Wed, 16 Jul 2008 22:25:24 +0000 (15:25 -0700)

Merge branch 'sp/maint-bash-completion-optim' into maint

* sp/maint-bash-completion-optim:
bash completion: Resolve git show ref:path<tab> losing ref: portion
bash completion: Append space after file names have been completed
bash completion: Don't offer "a.." as a completion for "a."
bash completion: Improve responsiveness of git-log completion

Merge branch 'sp/maint-pack-memuse' into maintJunio C Hamano Wed, 16 Jul 2008 22:24:07 +0000 (15:24 -0700)

Merge branch 'sp/maint-pack-memuse' into maint

* sp/maint-pack-memuse:
Correct pack memory leak causing git gc to try to exceed ulimit

Merge branch 'ls/maint-mailinfo-patch-label' into maintJunio C Hamano Wed, 16 Jul 2008 22:23:19 +0000 (15:23 -0700)

Merge branch 'ls/maint-mailinfo-patch-label' into maint

* ls/maint-mailinfo-patch-label:
git-mailinfo: Fix getting the subject from the in-body [PATCH] line

Merge branch 'js/maint-daemon-syslog' into maintJunio C Hamano Wed, 16 Jul 2008 22:22:05 +0000 (15:22 -0700)

Merge branch 'js/maint-daemon-syslog' into maint

* js/maint-daemon-syslog:
git daemon: avoid calling syslog() from a signal handler

rebase-i: keep old parents when preserving mergesStephan Beyer Wed, 16 Jul 2008 01:51:49 +0000 (03:51 +0200)

rebase-i: keep old parents when preserving merges

When "rebase -i -p" tries to preserve merges of unrelated branches, it
lost some parents:

- When you have more than two parents, the commit in the new history
ends up with fewer than expected number of parents and this breakage
goes unnoticed;

- When you are rebasing a merge with two parents and one is lost, the
command tries to cherry-pick the original merge commit, and the command
fails.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7600-merge: Use test_expect_failure to test option... Johannes Sixt Wed, 16 Jul 2008 08:33:52 +0000 (10:33 +0200)

t7600-merge: Use test_expect_failure to test option parsing

It used plain 'if git merge ...', which hides a segfault. The test does not pass.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix buffer overflow in prepare_attr_stackDmitry Potapov Wed, 16 Jul 2008 15:39:55 +0000 (19:39 +0400)

Fix buffer overflow in prepare_attr_stack

If PATH_MAX on your system is smaller than a path stored in the git repo,
it may cause the buffer overflow in prepare_attr_stack.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix buffer overflow in git diffDmitry Potapov Wed, 16 Jul 2008 14:54:02 +0000 (18:54 +0400)

Fix buffer overflow in git diff

If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix buffer overflow in git-grepDmitry Potapov Wed, 16 Jul 2008 15:33:29 +0000 (19:33 +0400)

Fix buffer overflow in git-grep

If PATH_MAX on your system is smaller than any path stored in the git
repository, that can cause memory corruption inside of the grep_tree
function used by git-grep.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cvsserver: fix call to nonexistant cleanupWorkDir()Lars Noschinski Wed, 16 Jul 2008 11:35:46 +0000 (13:35 +0200)

git-cvsserver: fix call to nonexistant cleanupWorkDir()

git-cvsserver.perl contained a single call to a nonexistant function
cleanupWorkDir(). This was obviously a typo for cleanupWorkTree().

Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-cherry-pick.txt et al.: Fix misleadin... Petr Baudis Wed, 16 Jul 2008 12:35:22 +0000 (14:35 +0200)

Documentation/git-cherry-pick.txt et al.: Fix misleading -n description

The manual page of git-cherry-pick and git-revert asserts that -n works
primarily on the working tree, while in fact the primary object it operates
on is the index, and the changes only "accidentally" propagate to the
working tree. This e.g. leads innocent #git IRC folks to believe that you
can use -n to prepare changes for git-add -i staging.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

index-pack: Honor core.deltaBaseCacheLimit when resolvi... Shawn O. Pearce Tue, 15 Jul 2008 04:45:34 +0000 (04:45 +0000)

index-pack: Honor core.deltaBaseCacheLimit when resolving deltas

If we are trying to resolve deltas for a long delta chain composed
of multi-megabyte objects we can easily run into requiring 500M+
of memory to hold each object in the chain on the call stack while
we recurse into the dependent objects and resolve them.

We now use a simple delta cache that discards objects near the
bottom of the call stack first, as they are the most least recently
used objects in this current delta chain. If we recurse out of a
chain we may find the base object is no longer available, as it was
free'd to keep memory under the deltaBaseCacheLimit. In such cases
we must unpack the base object again, which will require recursing
back to the root of the top of the delta chain as we released that
root first.

The astute reader will probably realize that we can still exceed
the delta base cache limit, but this happens only if the most
recent base plus the delta plus the inflated dependent sum up to
more than the base cache limit. Due to the way patch_delta is
currently implemented we cannot operate in less memory anyway.

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

index-pack: Track the object_entry that creates each... Shawn O. Pearce Mon, 14 Jul 2008 02:07:46 +0000 (22:07 -0400)

index-pack: Track the object_entry that creates each base_data

If we free the data stored within a base_data we need the struct
object_entry to get the data back again for use with another dependent
delta. Storing the object_entry* in base_data makes it simple to call
get_data_from_pack() to recover the compressed information.

This however means that we must add the missing base object to the end of
our packfile prior to calling resolve_delta() on each of the dependent
deltas. Adding the base first ensures we can read the base back from the
pack we are indexing, as if it had been included by the remote side.

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

index-pack: Chain the struct base_data on the stack... Shawn O. Pearce Mon, 14 Jul 2008 02:07:45 +0000 (22:07 -0400)

index-pack: Chain the struct base_data on the stack for traversal

We need to release earlier inflated base objects when memory gets
low, which means we need to be able to walk up or down the stack
to locate the objects we want to release, and free their data.

The new link/unlink routines allow inserting and removing the struct
base_data during recursion inside resolve_delta, and the global
base_cache gives us the head of the chain (bottom of the stack)
so we can traverse it.

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

index-pack: Refactor base arguments of resolve_delta... Shawn O. Pearce Mon, 14 Jul 2008 02:07:44 +0000 (22:07 -0400)

index-pack: Refactor base arguments of resolve_delta into a struct

We need to discard base objects which are not recently used if our
memory gets low, such as when we are unpacking a long delta chain
of a very large object.

To support tracking the available base objects we combine the
pointer and size into a struct. Future changes would allow the
data pointer to be free'd and marked NULL if memory gets low.

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

bash completion: Resolve git show ref:path<tab> losing... Shawn O. Pearce Tue, 15 Jul 2008 05:52:04 +0000 (05:52 +0000)

bash completion: Resolve git show ref:path<tab> losing ref: portion

Linus reported that the bash completion for git show often dropped
the ref portion of the argument (stuff before the :) when trying
to complete a file name of a file in another branch or tag.

Björn Steinbrink tracked it down to the gvfs completion script
which comes standard on many Fedora Core based systems. That is
removing : from COMP_WORDBREAKS, making readline treat the entire
argument (including the ref) as the name that must be completed.
When the git completion routines supplied a completion of just the
filename, readline replaced everything.

Since Git users often need to use "ref:path" or "ref:ref" sort of
arguments, and expect completion support on both sides of the :
we really want the : in COMP_WORDBREAKS to provide a good user
experience. This is also the default that ships with bash as it
can be useful in other contexts, such as rcp/scp.

We now try to add : back to COMP_WORDBREAKS if it has been removed
by a script that loaded before us. However if this doesn't work
(as the : is stripped after we load) we fallback in the completion
routines to include "ref:" as part of the prefix for completions,
allowing readine to fully insert the argument the user wanted.

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

bash completion: Append space after file names have... Shawn O. Pearce Mon, 14 Jul 2008 00:22:03 +0000 (00:22 +0000)

bash completion: Append space after file names have been completed

When completing `git show origin/maint:Makef<tab>` we should add a
space after the filename has been completed, so that the user can
immediately begin the next argument.

I also added a special case for the symlink variant so we treat it
just like a normal blob, as there are no items below it in the Git
tree structure.

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

git-mailinfo: Fix getting the subject from the in-body... Lukas Sandström Thu, 10 Jul 2008 21:41:33 +0000 (23:41 +0200)

git-mailinfo: Fix getting the subject from the in-body [PATCH] line

"Subject: " isn't in the static array "header", and thus
memcmp("Subject:", header[i], 7) will never match.

Even if it did so, hdr_data[] may not have been allocated if there weren't
a "Subject: " in-body when we process "[PATCH]" in the affected codepath.

Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash completion: Don't offer "a.." as a completion... Shawn O. Pearce Sun, 13 Jul 2008 22:06:31 +0000 (22:06 +0000)

bash completion: Don't offer "a.." as a completion for "a."

If the user is trying to complete "v1.5.3.<tab>" to see all of
the available maintenance releases for 1.5.3 we should not give
them an extra dot as the completion. Instead if the user wants
a ".." or a "..." operator they should key the two dots out on
their own. Its the same number of keystrokes either way.

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

GIT 1.5.6.3 v1.5.6.3Junio C Hamano Sun, 13 Jul 2008 22:23:43 +0000 (15:23 -0700)

GIT 1.5.6.3

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

git-am: Do not exit silently if committer is unsetStephan Beyer Sat, 12 Jul 2008 15:46:59 +0000 (17:46 +0200)

git-am: Do not exit silently if committer is unset

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash completion: Improve responsiveness of git-log... Shawn O. Pearce Sun, 13 Jul 2008 02:37:42 +0000 (02:37 +0000)

bash completion: Improve responsiveness of git-log completion

Junio noticed the bash completion has been taking a long time lately.
Petr Baudis tracked it down to 72e5e989b ("bash: Add space after
unique command name is completed."). Tracing the code showed
we spent significant time inside of this loop within __gitcomp,
due to the string copying overhead.

[28.146109654] _git common over
[28.164791148] gitrefs in
[28.280302268] gitrefs dir out
[28.300939737] gitcomp in
[28.308378112] gitcomp pre-case
* [28.313407453] gitcomp iter in
* [28.701270296] gitcomp iter out
[28.713370786] out normal

Since __git_refs avoids this string copying by forking and using
echo we use the same trick here when we need to finish generating
the names for the caller.

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

t0004: fix timing bugJunio C Hamano Sat, 12 Jul 2008 11:15:56 +0000 (04:15 -0700)

t0004: fix timing bug

The test created an initial commit, made .git/objects unwritable and then
exercised various codepaths to create loose commit, tree and blob objects
to make sure the commands notice failures from these attempts.

However, the initial commit was not preceded with test_tick, which made
its object name depend on the timestamp. The names of all the later tree
and blob objects the test tried to create were static. If the initial
commit's object name happened to begin with the same two hexdigits as the
tree or blob objects the test later attempted to create, the fan-out
directory in which these tree or blob would be created is already created
when the initial commit was made, and the object creation succeeds, and
commands being tested should not notice any failure --- in short, the test
was bogus.

This makes the fan-out directories also unwritable, and adds test_tick
before the commit object creation to make the test repeatable.

The contents of the file to create a blob from "a" to "60" is to force the
name of the blob object to begin with "1b", which shares the fan-out
directory with the initial commit that is created with the test. This was
useful when diagnosing the breakage of this test.

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

Add pretty format %aN which gives the author name,... Johannes Schindelin Fri, 11 Jul 2008 23:28:18 +0000 (00:28 +0100)

Add pretty format %aN which gives the author name, respecting .mailmap

The pretty format %an does not respect .mailmap, but gives the exact
author name recorded in the commit. Sometimes it is more desirable,
however, to look if the email has another name mapped to it in .mailmap.

This commit adds %aN (and %cN for the committer name) to do exactly that.

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

git-mailinfo: document the -n optionLukas Sandström Thu, 10 Jul 2008 21:36:28 +0000 (23:36 +0200)

git-mailinfo: document the -n option

Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix backwards-incompatible handling of core.sharedRepos... Petr Baudis Sat, 12 Jul 2008 01:15:03 +0000 (03:15 +0200)

Fix backwards-incompatible handling of core.sharedRepository

06cbe85 (Make core.sharedRepository more generic, 2008-04-16) broke the
traditional setting of core.sharedRepository to true, which was to make
the repository group writable: with umask 022, it would clear the
permission bits for 'other'. (umask 002 did not exhibit this behaviour
since pre-chmod() check in adjust_shared_perm() fails in that case.)

The call to adjust_shared_perm() should only loosen the permission.
If the user has umask like 022 or 002 that allow others to read, the
resulting files should be made readable and writable by group, without
restricting the readability by others.

This patch fixes the adjust_shared_perm() mode tweak based on Junio's
suggestion and adds the appropriate tests to t/t1301-shared-repo.sh.

Cc: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Correct pack memory leak causing git gc to try to excee... Shawn O. Pearce Wed, 9 Jul 2008 07:10:07 +0000 (07:10 +0000)

Correct pack memory leak causing git gc to try to exceed ulimit

When recursing to unpack a delta base we must unuse_pack() so that
the pack window for the current object does not remain pinned in
memory while the delta base is itself being unpacked and materialized
for our use.

On a long delta chain of 50 objects we may need to access 6 different
windows from a very large (>3G) pack file in order to obtain all
of the delta base content. If the process ulimit permits us to
map/allocate only 1.5G we must release windows during this recursion
to ensure we stay within the ulimit and transition memory from pack
cache to standard malloc, or other mmap needs.

Inserting an unuse_pack() call prior to the recursion allows us to
avoid pinning the current window, making it available for garbage
collection if memory runs low.

This has been broken since at least before 1.5.1-rc1, and very
likely earlier than that. Its fixed now. :)

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

Start preparing release notes for 1.5.6.3Junio C Hamano Wed, 9 Jul 2008 06:57:14 +0000 (23:57 -0700)

Start preparing release notes for 1.5.6.3

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

git-submodule - Fix bugs in adding an existing repo... Mark Levedahl Tue, 8 Jul 2008 02:36:40 +0000 (22:36 -0400)

git-submodule - Fix bugs in adding an existing repo as a module

git-submodule add would trip if path to the submodule included a space,
or if its .git was a gitdir: link to a GIT_DIR kept elsewhere. Fix both.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash: offer only paths after '--'SZEDER Gábor Tue, 8 Jul 2008 16:56:14 +0000 (18:56 +0200)

bash: offer only paths after '--'

Many git commands use '--' to separate subcommands, options, and refs
from paths. However, the programmable completion for several of these
commands does not respect the '--', and offer subcommands, options, or
refs after a '--', although only paths are permitted. e.g. 'git bisect
-- <TAB>' offers subcommands, 'git log -- --<TAB>' offers options and
'git log -- git<TAB>' offers all gitgui tags.

The completion for the following commands share this wrong behaviour:
am add bisect commit diff log reset shortlog submodule gitk.

To avoid this, we check the presence of a '--' on the command line first
and let the shell do filename completion, if one is found.

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

Remove unnecessary pack-*.keep file after successful... Shawn O. Pearce Tue, 8 Jul 2008 04:46:06 +0000 (04:46 +0000)

Remove unnecessary pack-*.keep file after successful git-clone

Once a clone is successful we no longer need to hold onto the
.keep file created by the transport. Delete the file so we
can later repack the complete repository.

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

make deleting a missing ref more quietJeff King Tue, 8 Jul 2008 04:08:02 +0000 (00:08 -0400)

make deleting a missing ref more quiet

If git attempts to delete a ref, but the unlink of the ref
file fails, we print a message to stderr. This is usually a
good thing, but if the error is ENOENT, then it indicates
that the ref has _already_ been deleted. And since that's
our goal, it doesn't make sense to complain to the user.

This harmonizes the error reporting behavior for the
unpacked and packed cases; the packed case already printed
nothing on ENOENT, but the unpacked printed unconditionally.

Additionally, send-pack would, when deleting the tracking
ref corresponding to a remote delete, print "Failed to
delete" on any failure. This can be a misleading
message, since we actually _did_ delete at the remote side,
but we failed to delete locally. Rather than make the
message more precise, let's just eliminate it entirely; the
delete_ref routine already takes care of printing out a much
more specific message about what went wrong.

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

Merge branch 'qq/maint' into maintJunio C Hamano Tue, 8 Jul 2008 20:05:06 +0000 (13:05 -0700)

Merge branch 'qq/maint' into maint

* qq/maint:
run_command(): respect GIT_TRACE

Merge branch 'lt/racy-empty' into maintJunio C Hamano Tue, 8 Jul 2008 07:19:17 +0000 (00:19 -0700)

Merge branch 'lt/racy-empty' into maint

* lt/racy-empty:
racy-git: an empty blob has a fixed object name

Merge branch 'qq/maint' (early part) into maintJunio C Hamano Mon, 7 Jul 2008 23:09:17 +0000 (16:09 -0700)

Merge branch 'qq/maint' (early part) into maint

* 'qq/maint' (early part):
git-svn.perl: workaround assertions in svn library 1.5.0
mailinfo: feed the correct line length to decode_transfer_encoding()
git-clone: remove leftover debugging fprintf().
Fix "config_error_nonbool" used with value instead of key
clone -q: honor "quiet" option over native transports.
attribute documentation: keep EXAMPLE at end
builtin-commit.c: Use 'git_config_string' to get 'commit.template'
http.c: Use 'git_config_string' to clean up SSL config.
diff.c: Use 'git_config_string' to get 'diff.external'
convert.c: Use 'git_config_string' to get 'smudge' and 'clean'
builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'
Documentation cvs: Clarify when a bare repository is needed
Documentation: be precise about which date --pretty uses

run_command(): respect GIT_TRACEJohannes Schindelin Mon, 7 Jul 2008 13:41:34 +0000 (14:41 +0100)

run_command(): respect GIT_TRACE

When GIT_TRACE is set, the user is most likely wanting to see an external
command that is about to be executed.

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

git-svn.perl: workaround assertions in svn library... Gerrit Pape Sun, 6 Jul 2008 19:28:50 +0000 (19:28 +0000)

git-svn.perl: workaround assertions in svn library 1.5.0

With subversion 1.5.0 (C and perl libraries) the git-svn selftest
t9101-git-svn-props.sh fails at test 25 and 26. The following commands
cause assertions in the svn library

$ cd deeply
$ git-svn propget svn:ignore .
perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed.
Aborted

$ git-svn propget svn:ignore ..
perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_subr/path.c:120: svn_path_join: Assertion `is_canonical(component, clen)' failed.

With this commit, git-svn makes sure the path doesn't start with a
slash, and is not a dot, working around these assertions.

The breakage was reported by Lucas Nussbaum through
http://bugs.debian.org/489108

Signed-off-by: Gerrit Pape <pape@smarden.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mailinfo: feed the correct line length to decode_transf... Junio C Hamano Mon, 7 Jul 2008 05:26:45 +0000 (22:26 -0700)

mailinfo: feed the correct line length to decode_transfer_encoding()

When handling a MIME multipart message, multi-part boundary lines are eaten
by a call to handle_boundary() function from the main loop of handle_body(),
and after that happens, we should update the line length correctly, because
handle_boundary() udpates line[] with new data.

This was caused by a thinko in 9aa2309 (mailinfo: apply the same fix not
to lose NULs in BASE64 and QP codepaths, 2008-05-25).

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

git-clone: remove leftover debugging fprintf().Alex Riesen Sun, 6 Jul 2008 22:56:49 +0000 (00:56 +0200)

git-clone: remove leftover debugging fprintf().

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

Fix grammar in git-rev-parse(1).Mikael Magnusson Sun, 6 Jul 2008 20:34:21 +0000 (22:34 +0200)

Fix grammar in git-rev-parse(1).

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

git daemon: avoid calling syslog() from a signal handlerJohannes Schindelin Thu, 3 Jul 2008 15:27:24 +0000 (16:27 +0100)

git daemon: avoid calling syslog() from a signal handler

Signal handlers should never call syslog(), as that can raise signals
of its own.

Instead, call the syslog() from the master process.

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

Fix "config_error_nonbool" used with value instead... Christian Couder Sun, 6 Jul 2008 04:10:04 +0000 (06:10 +0200)

Fix "config_error_nonbool" used with value instead of key

The function "config_error_nonbool", that is defined in "config.c",
is used to report an error when a config key in the config file
should have a corresponding value but it hasn't.

So the parameter to this function should be the key and not the
value, because the value is undefined. And it could crash if the
value is used.

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

clone -q: honor "quiet" option over native transports.Junio C Hamano Sun, 6 Jul 2008 00:58:50 +0000 (17:58 -0700)

clone -q: honor "quiet" option over native transports.

The earlier built-in conversion seems to have broken "git-clone"; this
teaches the command to honor the "-q" option again when talking to the
remote end over native transports (file://, git:// and ssh://).

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

attribute documentation: keep EXAMPLE at endJunio C Hamano Sun, 6 Jul 2008 01:14:27 +0000 (18:14 -0700)

attribute documentation: keep EXAMPLE at end

The document gives overall definition of states in DESCRIPTION, describes
various aspects of git operations that can be influenced in EFFECTS, and
finally gives examples in the EXAMPLE section. Archive creation however
was somehow documented after the EXAMPLE section, not insode EFFECTS.

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

builtin-commit.c: Use 'git_config_string' to get 'commi... Brian Hetro Sat, 5 Jul 2008 05:24:40 +0000 (01:24 -0400)

builtin-commit.c: Use 'git_config_string' to get 'commit.template'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c: Use 'git_config_string' to clean up SSL config.Brian Hetro Sat, 5 Jul 2008 05:24:44 +0000 (01:24 -0400)

http.c: Use 'git_config_string' to clean up SSL config.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff.c: Use 'git_config_string' to get 'diff.external'Brian Hetro Sat, 5 Jul 2008 05:24:43 +0000 (01:24 -0400)

diff.c: Use 'git_config_string' to get 'diff.external'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

convert.c: Use 'git_config_string' to get 'smudge'... Brian Hetro Sat, 5 Jul 2008 05:24:42 +0000 (01:24 -0400)

convert.c: Use 'git_config_string' to get 'smudge' and 'clean'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-log.c: Use 'git_config_string' to get 'format... Brian Hetro Sat, 5 Jul 2008 05:24:41 +0000 (01:24 -0400)

builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation cvs: Clarify when a bare repository is... Matthew Ogilvie Sat, 5 Jul 2008 04:43:41 +0000 (22:43 -0600)

Documentation cvs: Clarify when a bare repository is needed

New users sometimes import a project and then immediately
try to use the imported repository as a central shared repository.
This provides pointers about setting up a bare repository for that
in the parts of the documentation dealing with CVS migration.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: be precise about which date --pretty... Nikolaus Schulz Sat, 5 Jul 2008 00:00:13 +0000 (02:00 +0200)

Documentation: be precise about which date --pretty uses

This makes it explicit that the --pretty formats 'medium' and 'email' use the
author date (and ignore the committer date).

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

GIT 1.5.6.2 v1.5.6.2Junio C Hamano Fri, 4 Jul 2008 08:12:54 +0000 (01:12 -0700)

GIT 1.5.6.2

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

Fix executable bits in t/ scriptsJunio C Hamano Fri, 4 Jul 2008 08:38:34 +0000 (01:38 -0700)

Fix executable bits in t/ scripts

Pointed out by Ramsay Jones.

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

Work around gcc warnings from curl headersJunio C Hamano Fri, 4 Jul 2008 07:37:40 +0000 (00:37 -0700)

Work around gcc warnings from curl headers

After master.k.org upgrade, I started seeing these warning messages:

transport.c: In function 'get_refs_via_curl':
transport.c:458: error: call to '_curl_easy_setopt_err_write_callback' declared with attribute warning: curl_easy_setopt expects a curl_write_callback argument for this option

It appears that the curl header wants to enforce the function signature
for callback function given to curl_easy_setopt() to be compatible with
that of (*curl_write_callback) or fwrite. This patch seems to work the
issue around.

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

Merge branch 'js/maint-clone-insteadof' into maintJunio C Hamano Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)

Merge branch 'js/maint-clone-insteadof' into maint

* js/maint-clone-insteadof:
clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
clone: respect url.insteadOf setting in global configs

Merge branch 'jk/maint-fetch-ref-hier' into maintJunio C Hamano Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)

Merge branch 'jk/maint-fetch-ref-hier' into maint

* jk/maint-fetch-ref-hier:
fetch: give a hint to the user when local refs fail to update
fetch: report local storage errors in status table

Merge branch 'jc/maint-reset' into maintJunio C Hamano Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)

Merge branch 'jc/maint-reset' into maint

* jc/maint-reset:
Allow "git-reset path" when unambiguous

Fix describe --tags --long so it does not segfaultShawn O. Pearce Thu, 3 Jul 2008 02:32:45 +0000 (02:32 +0000)

Fix describe --tags --long so it does not segfault

If we match a lightweight (non-annotated tag) as the name to
output and --long was requested we do not have a tag, nor do
we have a tagged object to display. Instead we must use the
object we were passed as input for the long format display.

Reported-by: Mark Burton <markb@ordern.com>
Backtraced-by: Mikael Magnusson <mikachu@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Start draft release notes for 1.5.6.2Junio C Hamano Wed, 2 Jul 2008 00:09:21 +0000 (17:09 -0700)

Start draft release notes for 1.5.6.2

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

Fix 'git show' on signed tag of signed tag of commitThomas Rast Tue, 1 Jul 2008 09:47:04 +0000 (11:47 +0200)

Fix 'git show' on signed tag of signed tag of commit

The cmd_show loop resolves tags by showing them, then pointing the
object to the 'tagged' member. However, this object is not fully
initialized; it only contains the SHA1. (This resulted in a segfault
if there were two levels of tags.) We apply parse_object to get a
full object.

Noticed by Kalle Olavi Niemitalo on IRC.

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

fetch: give a hint to the user when local refs fail... Jeff King Fri, 27 Jun 2008 04:01:41 +0000 (00:01 -0400)

fetch: give a hint to the user when local refs fail to update

There are basically two categories of update failures for
local refs:

1. problems outside of git, like disk full, bad
permissions, etc.

2. D/F conflicts on tracking branch ref names

In either case, there should already have been an error
message. In case '1', hopefully enough information has
already been given that the user can fix it. In the case of
'2', we can hint that the user can clean up their tracking
branch area by using 'git remote prune'.

Note that we don't actually know _which_ case we have, so
the user will receive the hint in case 1, as well. In this
case the suggestion won't do any good, but hopefully the
user is smart enough to figure out that it's just a hint.

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

doc/rev-parse: clarify reflog vs --until for specifying... Jeff King Mon, 30 Jun 2008 03:27:45 +0000 (23:27 -0400)

doc/rev-parse: clarify reflog vs --until for specifying revisions

The rev-parse manpage introduces the branch@{date} syntax,
and mentions the reflog specifically. However, new users may
not be familiar with the distinction between the reflog and
the commit date, so let's help them out with a "you may be
interested in --until" pointer.

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

clone: respect the settings in $HOME/.gitconfig and... Johannes Schindelin Fri, 27 Jun 2008 12:55:23 +0000 (13:55 +0100)

clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig

After initializing the config in the newly-created repository, we
need to unset GIT_CONFIG so that the global configs are read again.

Noticed by Pieter de Bie.

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

git-svn: don't sanitize remote names in configEric Wong Sun, 29 Jun 2008 03:40:32 +0000 (20:40 -0700)

git-svn: don't sanitize remote names in config

The original sanitization code was just taken from the
remotes2config.sh shell script in contrib.

Credit to Avery Pennarun for noticing this mistake, and Junio
for clarifying the rules for config section names:

Junio C Hamano wrote in <7vfxr23s6m.fsf@gitster.siamese.dyndns.org>:

> In
>
> [foo "bar"] baz = value
>
> foo and baz must be config.c::iskeychar() (and baz must be isalpha()), but
> "bar" can be almost anything.

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

git-svn: avoid filling up the disk with temp files.Avery Pennarun Sat, 28 Jun 2008 23:33:56 +0000 (19:33 -0400)

git-svn: avoid filling up the disk with temp files.

Commit ffe256f9bac8a40ff751a9341a5869d98f72c285 ("git-svn: Speed up fetch")
introduced changes that create a temporary file for each object fetched by
svn. These files should be deleted automatically, but perl apparently
doesn't do this until the process exits (or perhaps when its garbage
collector runs).

This means that on a large fetch, especially with lots of branches, we
sometimes fill up /tmp completely, which prevents the next temp file from
being written completely. This is aggravated by the fact that a new temp
file is created for each updated file, even if that update produces a file
identical to one already in git. Thus, it can happen even if there's lots
of disk space to store the finished repository.

We weren't adequately checking for write errors, so this would result in an
invalid file getting committed, which caused git-svn to fail later with an
invalid checksum.

This patch adds a check to syswrite() so similar problems don't lead to
corruption in the future. It also unlink()'s each temp file explicitly
when we're done with it, so the disk doesn't need to fill up.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Tested-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git cat-file: Fix memory leak in batch modeBjörn Steinbrink Sun, 29 Jun 2008 01:21:25 +0000 (03:21 +0200)

git cat-file: Fix memory leak in batch mode

When run in batch mode, git cat-file never frees the memory for the blob
contents it is printing. This quickly adds up and causes git-svn to be
hardly usable for imports of large svn repos, because it uses cat-file in
batch mode and cat-file's memory usage easily reaches several hundred MB
without any good reason.

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

fix git config example syntaxJoey Hess Sat, 28 Jun 2008 20:02:47 +0000 (16:02 -0400)

fix git config example syntax

git-config expects a space, not '=' between option and value.

Also, quote the value since it contains globs, which some shells will not
pass through unchanged, or will abort if the glob doesn't expand.

Signed-off-by: Joey Hess <joey@kitenet.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

avoid off-by-one error in run_upload_archiveJochen Voss Sat, 28 Jun 2008 16:04:24 +0000 (17:04 +0100)

avoid off-by-one error in run_upload_archive

Make sure that buf has enough space to store the trailing \0 of
the command line argument, too.

Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: report local storage errors in status tableJeff King Fri, 27 Jun 2008 03:59:50 +0000 (23:59 -0400)

fetch: report local storage errors in status table

Previously, if there was an error while storing a local
tracking ref, the low-level functions would report an error,
but fetch's status output wouldn't indicate any problem.
E.g., imagine you have an old "refs/remotes/origin/foo/bar" but
upstream has deleted "foo/bar" in favor of a new branch
"foo". You would get output like this:

error: there are still refs under 'refs/remotes/origin/foo'
From $url_of_repo
* [new branch] foo -> origin/foo

With this patch, the output takes into account the status of
updating the local ref:

error: there are still refs under 'refs/remotes/origin/foo'
From $url_of_repo
! [new branch] foo -> origin/foo (unable to update local ref)

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

clone: respect url.insteadOf setting in global configsJohannes Schindelin Fri, 27 Jun 2008 12:56:05 +0000 (13:56 +0100)

clone: respect url.insteadOf setting in global configs

When we call "git clone" with a url that has a rewrite rule in either
$HOME/.gitconfig or /etc/gitconfig, the URL can be different from
what the command line expects it to be.

So, let's use the URL as the remote structure has it, not the literal
string from the command line.

Noticed by Pieter de Bie.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.5.5' into maintJunio C Hamano Fri, 27 Jun 2008 01:08:51 +0000 (18:08 -0700)

Merge branch 'maint-1.5.5' into maint

* maint-1.5.5:
GIT 1.5.5.5
GIT 1.5.4.6
git-shell: accept "git foo" form

Conflicts:

GIT-VERSION-GEN
RelNotes

GIT 1.5.5.5 v1.5.5.5Junio C Hamano Fri, 27 Jun 2008 00:16:50 +0000 (17:16 -0700)

GIT 1.5.5.5

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

Merge branch 'maint-1.5.4' into maint-1.5.5Junio C Hamano Fri, 27 Jun 2008 00:14:03 +0000 (17:14 -0700)

Merge branch 'maint-1.5.4' into maint-1.5.5

* maint-1.5.4:
GIT 1.5.4.6
git-shell: accept "git foo" form

Conflicts:

GIT-VERSION-GEN
RelNotes