gitweb.git
Remove preemptive allocations.Pierre Habouzit Sun, 16 Sep 2007 08:19:01 +0000 (10:19 +0200)

Remove preemptive allocations.

Careful profiling shows that we spend more time guessing what pattern
allocation will have, whereas we can delay it only at the point where
add_rfc2047 will be used and don't allocate huge memory area for the many
cases where it's not.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Refactor replace_encoding_header.Pierre Habouzit Sat, 15 Sep 2007 21:50:12 +0000 (23:50 +0200)

Refactor replace_encoding_header.

* Be more clever in how we search for "encoding ...\n": parse for real
instead of the sloppy strstr's.
* use strbuf_splice to do the substring replacements.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-apply: use strbuf's instead of buffer_desc's.Pierre Habouzit Sun, 16 Sep 2007 16:54:42 +0000 (18:54 +0200)

builtin-apply: use strbuf's instead of buffer_desc's.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Now that cache.h needs strbuf.h, remove useless includes.Pierre Habouzit Sat, 15 Sep 2007 13:56:50 +0000 (15:56 +0200)

Now that cache.h needs strbuf.h, remove useless includes.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Rewrite convert_to_{git,working_tree} to use strbuf's.Pierre Habouzit Sun, 16 Sep 2007 13:51:04 +0000 (15:51 +0200)

Rewrite convert_to_{git,working_tree} to use strbuf's.

* Now, those functions take an "out" strbuf argument, where they store their
result if any. In that case, it also returns 1, else it returns 0.
* those functions support "in place" editing, in the sense that it's OK to
call them this way:
convert_to_git(path, sb->buf, sb->len, sb);
When doable, conversions are done in place for real, else the strbuf
content is just replaced with the new one, transparentely for the caller.

If you want to create a new filter working this way, being the accumulation
of filter1, filter2, ... filtern, then your meta_filter would be:

int meta_filter(..., const char *src, size_t len, struct strbuf *sb)
{
int ret = 0;
ret |= filter1(...., src, len, sb);
if (ret) {
src = sb->buf;
len = sb->len;
}
ret |= filter2(...., src, len, sb);
if (ret) {
src = sb->buf;
len = sb->len;
}
....
return ret | filtern(..., src, len, sb);
}

That's why subfilters the convert_to_* functions called were also rewritten
to work this way.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

New strbuf APIs: splice and attach.Pierre Habouzit Sat, 15 Sep 2007 13:56:50 +0000 (15:56 +0200)

New strbuf APIs: splice and attach.

* strbuf_splice replace a portion of the buffer with another.
* strbuf_attach replace a strbuf buffer with the given one, that should be
malloc'ed. Then it enforces strbuf's invariants. If alloc > len, then this
function has negligible cost, else it will perform a realloc, possibly
with a cost.

Also some style issues are fixed now.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint' of git://linux-nfs.org/~bfields... Junio C Hamano Sun, 16 Sep 2007 06:18:05 +0000 (23:18 -0700)

Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint

* 'maint' of git://linux-nfs.org/~bfields/git:
core-tutorial: minor cleanup
documentation: replace Discussion section by link to user-manual chapter
user-manual: todo updates and cleanup
user-manual: fix introduction to packfiles
user-manual: move packfile and dangling object discussion
user-manual: rewrite object database discussion
user-manual: reorder commit, blob, tree discussion
user-manual: rewrite index discussion
user-manual: create new "low-level git operations" chapter
user-manual: rename "git internals" to "git concepts"
user-manual: move object format details to hacking-git chapter
user-manual: adjust section levels in "git internals"

core-tutorial: minor cleanupJ. Bruce Fields Mon, 3 Sep 2007 14:34:27 +0000 (10:34 -0400)

core-tutorial: minor cleanup

Revise the introduction for concision, add pointers to the tutorial and
user manual as appropriate, delete cvsimport note from the end, as that
work's been done elsewhere already.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

documentation: replace Discussion section by link to... J. Bruce Fields Mon, 3 Sep 2007 04:01:19 +0000 (00:01 -0400)

documentation: replace Discussion section by link to user-manual chapter

The "Discussion" section has a lot of useful information, but is a
little wordy, especially for an already-long man page, and is designed
for an audience more of potential git hackers than users, which probably
doesn't make as much sense as git matures. Also, I (perhaps foolishly)
forked a version in the user manual, which has been significantly
rewritten in an attempt to address some of the above problems.

So, remove this section and replace it by a (very terse) summary of the
original material--my attempt at the World's Shortest Git Overview--and
a reference to the appropriate chapter of the user manual. It's
unfortunate to remove something that's been in this place for a long
time, as some people may still depend on finding it there. But I think
we'll want to do this some day anyway.

Cc: Andreas Ericsson <ae@op5.se>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: todo updates and cleanupJ. Bruce Fields Mon, 3 Sep 2007 03:28:49 +0000 (23:28 -0400)

user-manual: todo updates and cleanup

Format a couple lists. Reminder that we may want to add submodule
documentation some day.

user-manual: fix introduction to packfilesJ. Bruce Fields Sun, 9 Sep 2007 02:27:18 +0000 (22:27 -0400)

user-manual: fix introduction to packfiles

Actually I don't think we've previously mentioned .git/objects, so we
need a different introduction here.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: move packfile and dangling object discussionJ. Bruce Fields Sun, 9 Sep 2007 02:13:53 +0000 (22:13 -0400)

user-manual: move packfile and dangling object discussion

The discussions of packfiles and dangling objects both belong in the
object database section.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: rewrite object database discussionJ. Bruce Fields Sun, 10 Jun 2007 19:15:08 +0000 (15:15 -0400)

user-manual: rewrite object database discussion

Rewrite the introduction. Rewrite each section completely to make them
work in the new order, to add some examples, and to move plumbing
commands (like git-commit-tree) to the following chapter.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: reorder commit, blob, tree discussionJ. Bruce Fields Sat, 1 Sep 2007 03:26:38 +0000 (23:26 -0400)

user-manual: reorder commit, blob, tree discussion

The bottom-up blog, tree, commit order makes sense unless you want to
give explicit examples--it's easier to discover objects to examine if
you go in the other order....,

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: rewrite index discussionJ. Bruce Fields Mon, 3 Sep 2007 16:59:55 +0000 (12:59 -0400)

user-manual: rewrite index discussion

Add an example using git-ls-files, standardize on the new "index"
terminology (as opposed to "cache"), attempt to clarify discussion and
make it a little shorter, avoid some unnecessary jargon ("write-back
cache").

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: create new "low-level git operations"... J. Bruce Fields Mon, 3 Sep 2007 15:27:56 +0000 (11:27 -0400)

user-manual: create new "low-level git operations" chapter

The low-level index operations aren't as important to regular users as
the rest of this "git concepts" chapter; so move it into a separate
chapter, and do some minor cleanup.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: rename "git internals" to "git concepts"J. Bruce Fields Fri, 31 Aug 2007 03:10:05 +0000 (23:10 -0400)

user-manual: rename "git internals" to "git concepts"

"git internals" sounds like something only git developers must know
about, but this stuff should be of wider interest. Rename the chapter
and give it a slightly friendlier introduction.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: move object format details to hacking... J. Bruce Fields Fri, 31 Aug 2007 03:07:05 +0000 (23:07 -0400)

user-manual: move object format details to hacking-git chapter

Most of this is probably only of interest to git developers.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

user-manual: adjust section levels in "git internals"J. Bruce Fields Fri, 31 Aug 2007 02:49:33 +0000 (22:49 -0400)

user-manual: adjust section levels in "git internals"

The descriptions of the various object types should all be a subsection
of the "Object Database" section.

I cribbed most of this chapter from the README (now core-intro.txt and
git(7)), because there's stuff in there people need to know and I was
too lazy to rewrite it. The audience isn't quite right, though--the
chapter is a mixture of user- and developer- level documentation that
isn't as appropriate now as it was originally.

So, reserve this chapter for stuff users need to know, and move the
source code introduction into a new "git hacking" chapter where we'll
also move any hacker-only technical details.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

revision walker: --cherry-pick is a limited operationJohannes Schindelin Sat, 15 Sep 2007 17:39:52 +0000 (18:39 +0100)

revision walker: --cherry-pick is a limited operation

We used to rely on the fact that cherry-pick would trigger the code path
to set limited = 1 in handle_commit(), when an uninteresting commit was
encountered.

However, when cherry picking between two independent branches, i.e. when
there are no merge bases, and there is only linear development (which can
happen when you cvsimport a fork of a project), no uninteresting commit
will be encountered.

So set limited = 1 when --cherry-pick was asked for.

Noticed by Martin Bähr.

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

git-sh-setup: typofix in commentsJunio C Hamano Sat, 15 Sep 2007 23:32:23 +0000 (16:32 -0700)

git-sh-setup: typofix in comments

Noticed by Anupam Srivastava.

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

rebase: allow starting from a dirty tree.Junio C Hamano Mon, 9 Jul 2007 07:51:23 +0000 (00:51 -0700)

rebase: allow starting from a dirty tree.

This uses the new "git stash create" interface to stash away the dirty state
you have in your working tree before starting a rebase, and then replaying
it when you are done with stashing.

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

stash: implement "stash create"Junio C Hamano Sun, 8 Jul 2007 08:38:32 +0000 (01:38 -0700)

stash: implement "stash create"

This subcommand creates a stash from the current state and writes out the
resulting commit object ID to the standard output, without updating the
stash ref nor resetting the tree. It is intended to be used by scripts
to temporarily rewind the working tree to a clean state.

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

Merge branch 'js/remote'Junio C Hamano Sat, 15 Sep 2007 05:38:06 +0000 (22:38 -0700)

Merge branch 'js/remote'

* js/remote:
Teach "git remote" a mirror mode

Merge branch 'js/tag'Junio C Hamano Sat, 15 Sep 2007 05:37:55 +0000 (22:37 -0700)

Merge branch 'js/tag'

* js/tag:
verify-tag: also grok CR/LFs in the tag signature

Merge branch 'lh/svn-first-parent'Junio C Hamano Sat, 15 Sep 2007 05:37:43 +0000 (22:37 -0700)

Merge branch 'lh/svn-first-parent'

* lh/svn-first-parent:
git-svn: always use --first-parent
git-svn: add support for --first-parent

Merge branch 'np/delta'Junio C Hamano Sat, 15 Sep 2007 05:33:28 +0000 (22:33 -0700)

Merge branch 'np/delta'

* np/delta:
builtin-pack-objects.c: avoid bogus gcc warnings
threaded delta search: proper locking for cache accounting
threaded delta search: add pack.threads config variable
fix threaded delta search locking
threaded delta search: specify number of threads at run time
threaded delta search: better chunck split point
threaded delta search: refine work allocation
basic threaded delta search
rearrange delta search progress reporting
localize window memory usage accounting
straighten the list of objects to deltify

builtin-pack-objects.c: avoid bogus gcc warningsJunio C Hamano Sat, 15 Sep 2007 05:30:20 +0000 (22:30 -0700)

builtin-pack-objects.c: avoid bogus gcc warnings

These empty statement marcos can solicit bogus "statement with no effect"
warnings; squelch them.

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

gitk: Fix bug in generating patchesPaul Mackerras Sat, 15 Sep 2007 02:08:38 +0000 (12:08 +1000)

gitk: Fix bug in generating patches

Commit 8f4893639129acfc866c71583317090aa2a46eab changed mkpatchgo
to use diffcmd rather than constructing the diff command itself.
Unfortunately diffcmd returns the command with a "|" as the first
element (ready for use with open), but exec won't accept the "|".
Thus we need to remove the "|".

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

Merge branch 'jc/pack'Junio C Hamano Sat, 15 Sep 2007 01:33:45 +0000 (18:33 -0700)

Merge branch 'jc/pack'

* jc/pack:
Keep last used delta base in the delta window

Merge branch 'dk/diff-delta'Junio C Hamano Sat, 15 Sep 2007 01:33:15 +0000 (18:33 -0700)

Merge branch 'dk/diff-delta'

* dk/diff-delta:
diff-delta.c: Rationalize culling of hash buckets
diff-delta.c: pack the index structure

Merge branch 'jc/partial-remove'Junio C Hamano Sat, 15 Sep 2007 01:23:01 +0000 (18:23 -0700)

Merge branch 'jc/partial-remove'

* jc/partial-remove:
Document ls-files --with-tree=<tree-ish>
git-commit: partial commit of paths only removed from the index
git-commit: Allow partial commit of file removal.

Document ls-files --with-tree=<tree-ish>Junio C Hamano Fri, 14 Sep 2007 23:59:04 +0000 (16:59 -0700)

Document ls-files --with-tree=<tree-ish>

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

git-commit: partial commit of paths only removed from... Junio C Hamano Fri, 14 Sep 2007 23:53:58 +0000 (16:53 -0700)

git-commit: partial commit of paths only removed from the index

Because a partial commit is meant to be a way to ignore what are
staged in the index, "git rm --cached A && git commit A" should
just record what is in A on the filesystem. The previous patch
made the command sequence to barf, saying that A has not been
added yet. This fixes it.

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

gitk: Get rid of lookingforhead, use commitinterest... Paul Mackerras Fri, 14 Sep 2007 23:33:39 +0000 (09:33 +1000)

gitk: Get rid of lookingforhead, use commitinterest instead

Now that we have a general-purpose way of taking some action when a
commit ID of interest is encountered, use that for triggering the
git diff-index process when we find the currently checked-out head,
rather than the special-purpose lookingforhead variable.

Also do the commitinterest processing in getcommitlines rather than
in showstuff.

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

gitk: Fix bugs in setting rowfinalPaul Mackerras Fri, 14 Sep 2007 23:04:11 +0000 (09:04 +1000)

gitk: Fix bugs in setting rowfinal

We weren't updating the rowfinal list in insertrow and removerow, so
it was getting out of sync with rowidlist, which resulted in Tcl errors.
This also optimizes the setting of rowfinal in layoutrows a bit.

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

Merge branch 'jc/grep-c'Junio C Hamano Fri, 14 Sep 2007 22:17:07 +0000 (15:17 -0700)

Merge branch 'jc/grep-c'

* jc/grep-c:
Split grep arguments in a way that does not requires to add /dev/null.
Documentation/git-config.txt: AsciiDoc tweak to avoid leading dot
Add test to check recent fix to "git add -u"
Documentation/git-archive.txt: a couple of clarifications.
Fix the rename detection limit checking
diff --no-index: do not forget to run diff_setup_done()

Split grep arguments in a way that does not requires... Junio C Hamano Fri, 14 Sep 2007 07:31:00 +0000 (00:31 -0700)

Split grep arguments in a way that does not requires to add /dev/null.

In order to (almost) always show the name of the file without
relying on "-H" option of GNU grep, we used to add /dev/null to
the argument list unless we are doing -l or -L. This caused
"/dev/null:0" to show up when -c is given in the output.

It is not enough to add -c to the set of options we do not pass
/dev/null for. When we have too many files, we invoke grep
multiple times and we need to avoid giving a widow filename to
the last invocation -- otherwise we will not see the name.

This keeps two filenames when the argv[] buffer is about to
overflow and we have not finished iterating over the index, so
that the last round will always have at least two paths to work
with (and not require /dev/null).

An obvious and the only exception is when there is only 1 file
that is given to the underlying grep, and in that case we avoid
passing /dev/null and let the external "grep -c" report only the
number of matches.

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

Documentation/git-config.txt: AsciiDoc tweak to avoid... Junio C Hamano Fri, 14 Sep 2007 21:51:08 +0000 (14:51 -0700)

Documentation/git-config.txt: AsciiDoc tweak to avoid leading dot

Bram Schoenmakers noticed that git-config document was formatted
incorrectly. Depending on the version of AsciiDoc and docbook
toolchain, it is sometimes taken as a numbered example by AsciiDoc,
some other times passed intact to roff format to confuse "man".

Since we refer to the repository metadata directory as $GIT_DIR
elsewhere, work it around by using that symbolic name.

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

Add test to check recent fix to "git add -u"Benoit Sigoure Fri, 14 Sep 2007 08:29:04 +0000 (10:29 +0200)

Add test to check recent fix to "git add -u"

An earlier commit fixed type-change case in "git add -u".
This adds a test to make sure we do not introduce regression.

At the same time, it fixes a stupid typo in the error message.

Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-archive.txt: a couple of clarifications.Jari Aalto Fri, 14 Sep 2007 18:38:02 +0000 (21:38 +0300)

Documentation/git-archive.txt: a couple of clarifications.

The description of the option gave impression that there
were several formats available by using three dots. There are
no other formats than tar and gzip currently supported.

Clarify that the archive goes to the standard output.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix the rename detection limit checkingLinus Torvalds Fri, 14 Sep 2007 17:39:48 +0000 (10:39 -0700)

Fix the rename detection limit checking

This adds more proper rename detection limits. Instead of just checking
the limit against the number of potential rename destinations, we verify
that the rename matrix (which is what really matters) doesn't grow
ridiculously large, and we also make sure that we don't overflow when
doing the matrix size calculation.

This also changes the default limits from unlimited, to a rename matrix
that is limited to 100 entries on a side. You can raise it with the config
entry, or by using the "-l<n>" command line flag, but at least the default
is now a sane number that avoids spending lots of time (and memory) in
situations that likely don't merit it.

The choice of default value is of course very debatable. Limiting the
rename matrix to a 100x100 size will mean that even if you have just one
obvious rename, but you also create (or delete) 10,000 files, the rename
matrix will be so big that we disable the heuristics. Sounds reasonable to
me, but let's see if people hit this (and, perhaps more importantly,
actually *care*) in real life.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff --no-index: do not forget to run diff_setup_done()Junio C Hamano Fri, 14 Sep 2007 19:12:32 +0000 (12:12 -0700)

diff --no-index: do not forget to run diff_setup_done()

Code inspection by Linus found this.

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

Merge branch 'jc/cachetree' into cr/resetJunio C Hamano Fri, 14 Sep 2007 08:19:30 +0000 (01:19 -0700)

Merge branch 'jc/cachetree' into cr/reset

* jc/cachetree:
Simplify cache API
git-format-patch --in-reply-to: accept <message@id> with angle brackets
git-add -u: do not barf on type changes
Remove duplicate note about removing commits with git-filter-branch
git-clone: improve error message if curl program is missing or not executable
git.el: Allow the add and remove commands to be applied to ignored files.
git.el: Allow selecting whether to display uptodate/unknown/ignored files.
git.el: Keep the status buffer sorted by filename.
hooks--update: Explicitly check for all zeros for a deleted ref.

Simplify cache APIJunio C Hamano Fri, 14 Sep 2007 03:33:11 +0000 (20:33 -0700)

Simplify cache API

Earlier, add_file_to_index() invalidated the path in the cache-tree
but remove_file_from_cache() did not, and the user of the latter
needed to invalidate the entry himself. This led to a few bugs due to
missed invalidate calls already. This patch makes the management of
cache-tree less error prone by making more invalidate calls from lower
level cache API functions.

The rules are:

- If you are going to write the index, you should either maintain
cache_tree correctly.

- If you cannot, alternatively you can remove the entire cache_tree
by calling cache_tree_free() before you call write_cache().

- When you modify the index, cache_tree_invalidate_path() should be
called with the path you are modifying, to discard the entry from
the cache-tree structure.

- The following cache API functions exported from read-cache.c (and
the macro whose names have "cache" instead of "index")
automatically call cache_tree_invalidate_path() for you:

- remove_file_from_index();
- add_file_to_index();
- add_index_entry();

You can modify the index bypassing the above API functions
(e.g. find an existing cache entry from the index and modify it in
place). You need to call cache_tree_invalidate_path() yourself in
such a case.

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

Merge branch 'maint'Junio C Hamano Fri, 14 Sep 2007 07:55:32 +0000 (00:55 -0700)

Merge branch 'maint'

* maint:
git-format-patch --in-reply-to: accept <message@id> with angle brackets
git-add -u: do not barf on type changes
Remove duplicate note about removing commits with git-filter-branch
git-clone: improve error message if curl program is missing or not executable
hooks--update: Explicitly check for all zeros for a deleted ref.

git-format-patch --in-reply-to: accept <message@id... Junio C Hamano Fri, 14 Sep 2007 05:30:45 +0000 (22:30 -0700)

git-format-patch --in-reply-to: accept <message@id> with angle brackets

This will allow RFC-literate users to say:

format-patch --in-reply-to='<message.id@site.name>'

without forcing them to strip the surrounding angle brackets
like this:

format-patch --in-reply-to='message.id@site.name'

We accept both forms, and the latter gets necessary < and >
around it as before.

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

git-add -u: do not barf on type changesJunio C Hamano Fri, 14 Sep 2007 07:45:29 +0000 (00:45 -0700)

git-add -u: do not barf on type changes

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

archive: fix subst file generationRené Scharfe Thu, 13 Sep 2007 22:13:06 +0000 (00:13 +0200)

archive: fix subst file generation

Before the strbuf conversion, result was a char pointer. The if
statement checked for it being not NULL, which meant that no
"$Format:...$" string had been found and no replacement had to be
made. format_subst() returned NULL in that case -- the caller
then simply kept the original file content, as it was unaffected
by the expansion.

The length of the string being 0 is not the same as the string
being NULL (expansion to an empty string vs. no expansion at all),
so checking result.len != 0 is not a full replacement for the old
NULL check.

However, I doubt the subtle optimization explained above resulted
in a notable speed-up anyway. Simplify the code and add the tail
of the file to the expanded string unconditionally.

[jc: added a test to expose the breakage this fixes]

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

Remove duplicate note about removing commits with git... Ulrik Sverdrup Thu, 13 Sep 2007 15:57:56 +0000 (17:57 +0200)

Remove duplicate note about removing commits with git-filter-branch

A duplicate of an already existing section in the documentation of
git-filter-branch was added in commit
f95eef15f2f8a336b9a42749f5458c841a5a5d63.
This patch removes that redundant section.

Signed-off-by: Ulrik Sverdrup <ulrik.sverdrup@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Paper bag fix missing translated stringsShawn O. Pearce Fri, 14 Sep 2007 05:50:09 +0000 (01:50 -0400)

git-gui: Paper bag fix missing translated strings

The Tcl expression "[append [mc Foo] Bar]" does not return the string
"FooBar" after translation; instead it is setting the variable Foo to
the value Bar, or if Foo is already defined it is appending Bar onto
the end of it. This is *not* what we wanted to have happen here.

Tcl's join function is actually the correct function but its default
joinStr argument is a single space. Unfortunately all of our call
sites do not want an extra space added to their string. So we need
a small wrapper function to make the call to join with an empty
join string. In C this is (roughly) the job of the strcat function.
Since strcat is not yet used at the global level it is a reasonable
name to use here.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-clone: improve error message if curl program is... Gerrit Pape Thu, 13 Sep 2007 11:36:22 +0000 (11:36 +0000)

git-clone: improve error message if curl program is missing or not executable

If the curl program is not available (or not executable), and git clone is
started to clone a repository through http, this is the output

Initialized empty Git repository in /tmp/puppet/.git/
/usr/bin/git-clone: line 37: curl: command not found
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

This patch improves the error message by checking the return code when
running curl to exit immediately if it's 126 or 127; the error output now
is

Initialized empty Git repository in /tmp/puppet/.git/
/usr/bin/git-clone: line 37: curl: command not found

Adrian Bridgett noticed this and reported through
http://bugs.debian.org/440976

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

git.el: Allow the add and remove commands to be applied... Alexandre Julliard Thu, 13 Sep 2007 09:50:29 +0000 (11:50 +0200)

git.el: Allow the add and remove commands to be applied to ignored files.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git.el: Allow selecting whether to display uptodate... Alexandre Julliard Thu, 13 Sep 2007 09:50:08 +0000 (11:50 +0200)

git.el: Allow selecting whether to display uptodate/unknown/ignored files.

The default behavior for each state can be customized, and it can also
be toggled directly from the status buffer.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git.el: Keep the status buffer sorted by filename.Alexandre Julliard Thu, 13 Sep 2007 09:49:40 +0000 (11:49 +0200)

git.el: Keep the status buffer sorted by filename.

This makes insertions and updates much more efficient.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hooks--update: Explicitly check for all zeros for a... Alexandre Julliard Wed, 12 Sep 2007 21:36:03 +0000 (23:36 +0200)

hooks--update: Explicitly check for all zeros for a deleted ref.

The previous check caused the hook to reject as unannotated any tag
whose SHA1 starts with a zero.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

An additional test for "git-reset -- path"Junio C Hamano Fri, 14 Sep 2007 03:54:14 +0000 (20:54 -0700)

An additional test for "git-reset -- path"

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

git-gui: Make the tree browser also use lightgray selectionShawn O. Pearce Fri, 14 Sep 2007 00:52:34 +0000 (20:52 -0400)

git-gui: Make the tree browser also use lightgray selection

In 9adccb05 Matthijs Melchior changed our selection colors in the
main index/working directory file lists to use a lightgray as the
background color as this made the UI easier to read on all platforms.

When we did that change we missed doing also doing in the file
browser UI. Doing so just makes the entire thing UI consistent.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: add some strings to translationMichele Ballabio Thu, 13 Sep 2007 13:19:05 +0000 (15:19 +0200)

git-gui: add some strings to translation

Most of these changes were suggested by Shawn Pearce in an answer
to Johannes Schindelin.

Some strings for the blame module were added too.

[sp: Minor edits in blame module formatting]

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Merge branch 'maint'Shawn O. Pearce Fri, 14 Sep 2007 00:13:59 +0000 (20:13 -0400)

Merge branch 'maint'

* maint:
git-gui: Paper bag fix "Commit->Revert" format arguments
git-gui: Provide 'uninstall' Makefile target to undo an installation
git-gui: Font chooser to handle a large number of font families

git-gui: Paper bag fix "Commit->Revert" format argumentsShawn O. Pearce Fri, 14 Sep 2007 00:08:53 +0000 (20:08 -0400)

git-gui: Paper bag fix "Commit->Revert" format arguments

The recent bug fix to correctly handle filenames with %s (or any
other valid Tcl format specifier) missed a \ on this line and
caused the remaining format arguments to not be supplied when we
updated the status bar. This caused a Tcl error anytime the user
was trying to perform a file revert.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Provide 'uninstall' Makefile target to undo... Shawn O. Pearce Thu, 13 Sep 2007 23:50:35 +0000 (19:50 -0400)

git-gui: Provide 'uninstall' Makefile target to undo an installation

Several users have requested a "make uninstall" target be provided
in the stock git-gui Makefile so that they can undo an install
if git-gui goes to the wrong place during the initial install,
or if they are unhappy with the tool and want to remove it from
their system.

We currently assume that the complete set of files we need to delete
are those defined by our Makefile and current source directory.
This could differ from what the user actually has installed if they
installed one version then attempt to use another to perform the
uninstall. Right now I'm just going to say that is "pilot error".
Users should uninstall git-gui using the same version of source
that they used to make the installation. Perhaps in the future we
could read tclIndex and base our uninstall decisions on its contents.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Merge branch 'maint'Shawn O. Pearce Thu, 13 Sep 2007 23:19:42 +0000 (19:19 -0400)

Merge branch 'maint'

* maint:
git-gui: Make backporting changes from i18n version easier

git-gui: Font chooser to handle a large number of font... Shawn O. Pearce Thu, 13 Sep 2007 23:07:46 +0000 (19:07 -0400)

git-gui: Font chooser to handle a large number of font families

Simon Sasburg noticed that on X11 if there are more fonts than can
fit in the height of the screen Tk's native tk_optionMenu does not
offer scroll arrows to the user and it is not possible to review
all choices or to select those that are off-screen. On Mac OS X
the tk_optionMenu works properly but is awkward to navigate if the
list is long.

This is a rewrite of our font selection by providing a new modal
dialog that the user can launch from the git-gui Options panel.
The dialog offers the user a scrolling list of fonts in a pane.
An example text shows the user what the font looks like at the size
they have selected. But I have to admit the example pane is less
than ideal. For example in the case of our diff font we really
should show the user an example diff complete with our native diff
syntax coloring.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Simon Sasburg <simon.sasburg@gmail.com>

git-gui: Make backporting changes from i18n version... Shawn O. Pearce Thu, 13 Sep 2007 23:04:14 +0000 (19:04 -0400)

git-gui: Make backporting changes from i18n version easier

This is a very trivial hack to define a global mc procedure that
does not actually perform i18n translations on its input strings.
By declaring an mc procedure here in our maint version of git-gui
we can take patches that are intended for the latest development
version of git-gui and easily backport them without needing to
tweak the mc calls first.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-commit: Allow partial commit of file removal.Junio C Hamano Wed, 12 Sep 2007 23:04:22 +0000 (16:04 -0700)

git-commit: Allow partial commit of file removal.

When making a partial commit, git-commit uses git-ls-files with
the --error-unmatch option to expand and sanity check the user
supplied path patterns. When any path pattern does not match
with the paths known to the index, it errors out, in order to
catch a common mistake to say "git commit Makefiel cache.h"
and end up with a commit that touches only cache.h (notice the
misspelled "Makefile"). This detection however does not work
well when the path has already been removed from the index.

If you drop a path from the index and try to commit that
partially, i.e.

$ git rm COPYING
$ git commit -m 'Remove COPYING' COPYING

the command complains because git does not know anything about
COPYING anymore.

This introduces a new option --with-tree to git-ls-files and
uses it in git-commit when we build a temporary index to
write a tree object for the partial commit.

When --with-tree=<tree-ish> option is specified, names from the
given tree are added to the set of names the index knows about,
so we can treat COPYING file in the example as known.

Of course, there is no reason to use "git rm" and git-aware
people have long time done:

$ rm COPYING
$ git commit -m 'Remove COPYING' COPYING

which works just fine. But this caused a constant confusion.

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

git-gui: Document the new i18n context supportShawn O. Pearce Wed, 12 Sep 2007 21:03:27 +0000 (17:03 -0400)

git-gui: Document the new i18n context support

Translators working on po files will likely need to know what the
@@noun and @@verb parts are in the original message text, and why
these are different messages in the po files.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Disambiguate "commit"Harri Ilari Tapio Liusvaara Wed, 12 Sep 2007 20:02:35 +0000 (23:02 +0300)

git-gui: Disambiguate "commit"

Commit is used as both verb and noun. While these happen to be
the same in some languages, they are not the same in all
languages, so disambiguate them using context-sensitive i18n.

Signed-off-by: Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Support context-sensitive i18nShawn O. Pearce Wed, 12 Sep 2007 20:47:06 +0000 (16:47 -0400)

git-gui: Support context-sensitive i18n

Ocassionally, one would want to translate the same string used in
different contexts in diffrent ways. This patch provides a wrapper
for msgcat::mc that trims "@@" and anything coming after it, whether
or not the string actually got translated.

Proposed-by: Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Make "git reset" a builtin.Carlos Rica Tue, 11 Sep 2007 03:19:34 +0000 (05:19 +0200)

Make "git reset" a builtin.

This replaces the script "git-reset.sh" with "builtin-reset.c".

A few git commands used in the script are called from the builtin also:
"ls-files" to check for unmerged files, "read-tree" for resetting
the index file in "mixed" and "hard" resets, and "update-index" to
refresh at the end in the "mixed" reset and also for the option that
gets selected paths into the index.

The reset option with paths was implemented by Johannes Schindelin.

Since the option that gets selected paths into the index is not
a "reset" like the others because it does not change the HEAD at all,
now the command is showing a warning when the "--mixed" option
is supplied for that purpose.

The following table shows the behaviour of "git reset" for
the different supported options, where X means "changing"
the HEAD, index or working tree:

reset: --soft --mixed --hard -- <paths>
HEAD X X X -
index - X X X
files - - X -

Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Move make_cache_entry() from merge-recursive.c into... Carlos Rica Tue, 11 Sep 2007 03:17:28 +0000 (05:17 +0200)

Move make_cache_entry() from merge-recursive.c into read-cache.c

The function make_cache_entry() is too useful to be hidden away in
merge-recursive. So move it to libgit.a (exposing it via cache.h).

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

Add tests for documented features of "git reset".Carlos Rica Tue, 11 Sep 2007 01:09:52 +0000 (03:09 +0200)

Add tests for documented features of "git reset".

This adds the new file t/t7102-reset.sh following the text
and examples in "Documentation/git-reset.txt" in order to
check the behaviour of the upcoming "builtin-reset.c",
and be able to compare it with the original "git-reset.sh".

Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 12 Sep 2007 20:07:20 +0000 (13:07 -0700)

Merge branch 'maint'

* maint:
stash: end index commit log with a newline
git-commit: Disallow amend if it is going to produce an empty non-merge commit
git-send-email.perl: Add angle brackets to In-Reply-To if necessary
Fix a test failure (t9500-*.sh) on cygwin

Merge branch 'sp/maint-no-thin' into maintJunio C Hamano Wed, 12 Sep 2007 20:07:06 +0000 (13:07 -0700)

Merge branch 'sp/maint-no-thin' into maint

* sp/maint-no-thin:
Make --no-thin the default in git-push to save server resources

Define NO_MEMMEM of FreeBSD as it lacks the functionRobert Boone Mon, 10 Sep 2007 16:43:35 +0000 (11:43 -0500)

Define NO_MEMMEM of FreeBSD as it lacks the function

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

threaded delta search: proper locking for cache accountingNicolas Pitre Mon, 10 Sep 2007 15:10:11 +0000 (11:10 -0400)

threaded delta search: proper locking for cache accounting

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

stash: end index commit log with a newlineJean-Luc Herren Wed, 12 Sep 2007 18:45:03 +0000 (20:45 +0200)

stash: end index commit log with a newline

There was no newline at the end of the index commit message, putting
the shell prompt at its end after a 'git cat-file commit $id'. This is
similar to what was fixed in 843103d69388a5c74ed99753e1c162a66835b04d.

Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-commit: Disallow amend if it is going to produce... Dmitry V. Levin Wed, 12 Sep 2007 16:14:22 +0000 (20:14 +0400)

git-commit: Disallow amend if it is going to produce an empty non-merge commit

Right now one can amend the last non-merge commit using a dirty index
and in the process maybe cause the last commit to have the same tree
as its parent. In such a case one would want to discard the last commit
instead of amending it.

This reverts commit 8588452ceb78b1da17652ba03f9942ef740e07ea.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-send-email.perl: Add angle brackets to In-Reply... David Kastrup Wed, 12 Sep 2007 05:53:45 +0000 (07:53 +0200)

git-send-email.perl: Add angle brackets to In-Reply-To if necessary

Although message-id by defintion should have surrounding angle
brackets, there is no point forcing people to type them in.

Signed-off-by: David Kastrup <dak@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix a test failure (t9500-*.sh) on cygwinRamsay Jones Tue, 11 Sep 2007 18:16:51 +0000 (19:16 +0100)

Fix a test failure (t9500-*.sh) on cygwin

On filesystems where it is appropriate to set core.filemode
to false, test 29 ("commitdiff(0): mode change") fails when
git-commit does not notice a file (execute) permission change.

A fix requires noting the new file execute permission in the
index with a "git update-index --chmod=+x", prior to the commit.
Add a function (note_chmod) which implements this idea, and
insert a call in each test that modifies the x permission.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Shawn O. Pearce Tue, 11 Sep 2007 22:57:26 +0000 (18:57 -0400)

Merge branch 'maint'

* maint:
git-gui: Don't delete send on Windows as it doesn't exist

git-gui: Don't delete send on Windows as it doesn't... Shawn O. Pearce Tue, 11 Sep 2007 17:37:45 +0000 (13:37 -0400)

git-gui: Don't delete send on Windows as it doesn't exist

The Windows port of Tk does not have the send command so we
cannot delete it from our global namespace, but the Mac OS
X and X11 ports do have it. Switching this delete attempt
into a catch makes send go away, or stay away.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Replace all read_fd use with strbuf_read, and get rid... Pierre Habouzit Mon, 10 Sep 2007 10:35:09 +0000 (12:35 +0200)

Replace all read_fd use with strbuf_read, and get rid of it.

This brings builtin-stripspace, builtin-tag and mktag to use strbufs.

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

Use strbufs to in read_message (imap-send.c), custom... Pierre Habouzit Mon, 10 Sep 2007 10:35:08 +0000 (12:35 +0200)

Use strbufs to in read_message (imap-send.c), custom buffer--.

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

Use strbuf_read in builtin-fetch-tool.c.Pierre Habouzit Mon, 10 Sep 2007 10:35:07 +0000 (12:35 +0200)

Use strbuf_read in builtin-fetch-tool.c.

xrealloc.use --;

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

Rework pretty_print_commit to use strbufs instead of... Pierre Habouzit Mon, 10 Sep 2007 10:35:06 +0000 (12:35 +0200)

Rework pretty_print_commit to use strbufs instead of custom buffers.

Also remove the "len" parameter, as:
(1) it was used as a max boundary, and every caller used ~0u
(2) we check for final NUL no matter what, so it doesn't help for speed.

As a result most of the pp_* function takes 3 arguments less, and we need
a lot less local variables, this makes the code way more readable, and
easier to extend if needed.

This patch also fixes some spacing and cosmetic issues.

This patch also fixes (as a side effect) a memory leak intoruced in
builtin-archive.c at commit df4a394f (fmt was xmalloc'ed and not free'd)

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

Change semantics of interpolate to work like snprintf.Pierre Habouzit Mon, 10 Sep 2007 10:35:05 +0000 (12:35 +0200)

Change semantics of interpolate to work like snprintf.

Also fix many off-by-ones and a useless memset.

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

Strbuf API extensions and fixes.Pierre Habouzit Mon, 10 Sep 2007 10:35:04 +0000 (12:35 +0200)

Strbuf API extensions and fixes.

* Add strbuf_rtrim to remove trailing spaces.
* Add strbuf_insert to insert data at a given position.
* Off-by one fix in strbuf_addf: strbuf_avail() does not counts the final
\0 so the overflow test for snprintf is the strict comparison. This is
not critical as the growth mechanism chosen will always allocate _more_
memory than asked, so the second test will not fail. It's some kind of
miracle though.
* Add size extension hints for strbuf_init and strbuf_read. If 0, default
applies, else:
+ initial buffer has the given size for strbuf_init.
+ first growth checks it has at least this size rather than the
default 8192.

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

Merge branch 'master' into ph/strbufJunio C Hamano Mon, 10 Sep 2007 18:32:58 +0000 (11:32 -0700)

Merge branch 'master' into ph/strbuf

* master:
archive - leakfix for format_subst()
Make --no-thin the default in git-push to save server resources
fix doc for --compression argument to pack-objects
git-tag -s must fail if gpg cannot sign the tag.
git-svn: understand grafts when doing dcommit
git-diff: don't squelch the new SHA1 in submodule diffs
Define NO_MEMMEM on Darwin as it lacks the function
git-svn: fix "Malformed network data" with svn:// servers
(cvs|svn)import: Ask git-tag to overwrite old tags.
git-rebase: fix -C option
git-rebase: support --whitespace=<option>
Documentation / grammer nit
archive: rename attribute specfile to export-subst
archive: specfile syntax change: "$Format:%PLCHLDR$" instead of just "%PLCHLDR" (take 2)
add memmem()
Remove unused function convert_sha1_file()
archive: specfile support (--pretty=format: in archive files)
Export format_commit_message()

threaded delta search: add pack.threads config variableNicolas Pitre Mon, 10 Sep 2007 15:51:34 +0000 (11:51 -0400)

threaded delta search: add pack.threads config variable

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

fix threaded delta search lockingNicolas Pitre Mon, 10 Sep 2007 12:40:44 +0000 (08:40 -0400)

fix threaded delta search locking

Found by Jeff King.

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

Merge branch 'rs/archive'Junio C Hamano Mon, 10 Sep 2007 07:14:50 +0000 (00:14 -0700)

Merge branch 'rs/archive'

* rs/archive:
archive - leakfix for format_subst()
Define NO_MEMMEM on Darwin as it lacks the function
archive: rename attribute specfile to export-subst
archive: specfile syntax change: "$Format:%PLCHLDR$" instead of just "%PLCHLDR" (take 2)
add memmem()
Remove unused function convert_sha1_file()
archive: specfile support (--pretty=format: in archive files)
Export format_commit_message()

archive - leakfix for format_subst()Junio C Hamano Mon, 10 Sep 2007 07:14:38 +0000 (00:14 -0700)

archive - leakfix for format_subst()

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

Merge branch 'sp/maint-no-thin'Junio C Hamano Mon, 10 Sep 2007 07:00:39 +0000 (00:00 -0700)

Merge branch 'sp/maint-no-thin'

* sp/maint-no-thin:
Make --no-thin the default in git-push to save server resources
fix doc for --compression argument to pack-objects
git-tag -s must fail if gpg cannot sign the tag.

Make --no-thin the default in git-push to save server... Shawn O. Pearce Sun, 9 Sep 2007 23:38:11 +0000 (19:38 -0400)

Make --no-thin the default in git-push to save server resources

1) pushes happen less often than fetches, so the bandwidth saving is
much less visible in that case overall.

2) thin packs have to be complemented with missing delta bases to be
valid, so many received thin packs will take more disk space.

3) the bother of repacking should be distributed amongst "clients"
i.e. fetchers and pushers as much as possible, and not the server
being fetched or pushed, to keep disk and CPU usage low on the
server.

This is why a fetch should get thin packs but a push should not.

Both Nico and I have been assuming that --no-thin was the default
behavior of git-push ever since Nico introduced --fix-thin into the
index-pack process, which allowed fetch and receive-pack to avoid
exploding packfiles received during transfer. This patch finally
makes it so.

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

fix doc for --compression argument to pack-objectsNicolas Pitre Mon, 10 Sep 2007 04:15:29 +0000 (00:15 -0400)

fix doc for --compression argument to pack-objects

Remove obsolete details (core.legacyheaders is always true now).

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

git-gui: Localize commit/author dates when displaying... Shawn O. Pearce Mon, 10 Sep 2007 05:54:16 +0000 (01:54 -0400)

git-gui: Localize commit/author dates when displaying them

Currently the Git plumbing is not localized so it does not know how
to output weekday and month names that conform to the user's locale
preferences. This doesn't fit with the rest of git-gui's UI as some
of our dates are formatted in Tcl and some are just read from the Git
plumbing so dates aren't consistently presented.

Since git-for-each-ref is presenting us formatted dates and it offers
no way to change that setting even in git 1.5.3.1 we need to first do
a parse of the text strings it produces, correct for timezones, then
reformat the timestamp using Tcl's formatting routines.

Not exactly what I wanted to do but it gets us consistently presented
date strings in areas like the blame viewer and the revision picker
mega-widget's tooltips.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

threaded delta search: specify number of threads at... Nicolas Pitre Mon, 10 Sep 2007 04:06:11 +0000 (00:06 -0400)

threaded delta search: specify number of threads at run time

This adds a --threads=<n> parameter to 'git pack-objects' with
documentation.

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

threaded delta search: better chunck split pointNicolas Pitre Mon, 10 Sep 2007 04:06:10 +0000 (00:06 -0400)

threaded delta search: better chunck split point

Try to keep object with the same name hash together.

Suggested by Martin Koegler.

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

threaded delta search: refine work allocationNicolas Pitre Mon, 10 Sep 2007 04:06:09 +0000 (00:06 -0400)

threaded delta search: refine work allocation

With this, each thread get repeatedly assigned the next available chunk of
objects to process until the whole list is done. The idea is to have
reasonably small chunks so that all CPUs remain busy with a minimum
number of threads for as long as there is data to process.

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