gitweb.git
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>

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>

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>

git-tag -s must fail if gpg cannot sign the tag.Carlos Rica Sun, 9 Sep 2007 00:39:29 +0000 (02:39 +0200)

git-tag -s must fail if gpg cannot sign the tag.

Most of this patch code and message was written by Shawn O. Pearce.
I made some tests to know what the problem was, and then I changed
the code related with the SIGPIPE signal.

If the user has misconfigured `user.signingkey` in their .git/config
or just doesn't have any secret keys on their keyring and they ask
for a signed tag with `git tag -s` we better make sure the resulting
tag was actually signed by gpg.

Prior versions of builtin git-tag allowed this failure to slip
by without error as they were not checking the return value of
the finish_command() so they did not notice when gpg exited with
an error exit status. They also did not fail if gpg produced an
empty output or if read_in_full received an error from the read
system call while trying to read the pipe back from gpg.

Finally, we did not actually honor any return value from the do_sign
function as it returns ssize_t but was being stored into an unsigned
long. This caused the compiler to optimize out the die condition,
allowing git-tag to continue along and create the tag object.

However, when gpg gets a wrong username, it exits before any read was done
and then the writing process receives SIGPIPE and program is terminated.
By ignoring this signal, anyway, the function write_or_die gets EPIPE from
write_in_full and exits returning 0 to the system without a message.
Here we better call to write_in_full directly so we can fail
printing a message and return safely to the caller.

With these issues fixed `git-tag -s` will now fail to create the
tag and will report a non-zero exit status to its caller, thereby
allowing automated helper scripts to detect (and recover from)
failure if gpg is not working properly.

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

git-gui: Trim trailing slashes from untracked submodule... Shawn O. Pearce Mon, 10 Sep 2007 00:38:05 +0000 (20:38 -0400)

git-gui: Trim trailing slashes from untracked submodule names

Oddly enough `git ls-files --others` supplies us the name of an
untracked submodule by including the trailing slash but that
same git version will not accept the name with a trailing slash
through `git update-index --stdin`. Stripping off that final
slash character before loading it into our file lists allows
git-gui to stage changes to submodules just like any other file.

This change should give git-gui users some basic submodule support,
but it is strictly at the plumbing level as we do not actually know
about calling the git-submodule porcelain that is a recent addition
to git 1.5.3.

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

git-gui: Assume untracked directories are Git submodulesShawn O. Pearce Mon, 10 Sep 2007 00:13:10 +0000 (20:13 -0400)

git-gui: Assume untracked directories are Git submodules

If `git ls-files --others` returned us the name of a directory then
it is because Git has decided that this directory itself contains a
valid Git repository and its files shouldn't be listed as untracked
for this repository.

In such a case we should label the object as a Git repository and
not just as a directory.

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

diff-delta.c: Rationalize culling of hash bucketsDavid Kastrup Sat, 8 Sep 2007 21:25:55 +0000 (23:25 +0200)

diff-delta.c: Rationalize culling of hash buckets

The previous hash bucket culling resulted in a somewhat unpredictable
number of hash bucket entries in the order of magnitude of HASH_LIMIT.

Replace this with a Bresenham-like algorithm leaving us with exactly
HASH_LIMIT entries by uniform culling.

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

diff-delta.c: pack the index structureDavid Kastrup Sat, 8 Sep 2007 21:17:44 +0000 (23:17 +0200)

diff-delta.c: pack the index structure

In normal use cases, the performance wins are not overly impressive:
we get something like 5-10% due to the slightly better locality of
memory accesses using the packed structure.

However, since the data structure for index entries saves 33% of
memory on 32-bit platforms and 40% on 64-bit platforms, the behavior
when memory gets limited should be nicer.

This is a rather well-contained change. One obvious improvement would
be sorting the elements in one bucket according to their hash, then
using binary probing to find the elements with the right hash value.

As it stands, the output should be strictly the same as previously
unless one uses the option for limiting the amount of used memory, in
which case the created packs might be better.

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

git-gui: handle "deleted symlink" diff markerMichele Ballabio Sun, 9 Sep 2007 19:09:07 +0000 (21:09 +0200)

git-gui: handle "deleted symlink" diff marker

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

git-gui: show unstaged symlinks in diff viewerMichele Ballabio Sun, 9 Sep 2007 19:04:45 +0000 (21:04 +0200)

git-gui: show unstaged symlinks in diff viewer

git-gui has a minor problem with regards to symlinks that point
to directories.

git init
mkdir realdir
ln -s realdir linkdir
git gui

Now clicking on file names in the "unstaged changes" window,
there's a problem coming from the "linkdir" symlink: git-gui
complains with

error reading "file4": illegal operation on a directory

...even though git-gui can add that same symlink to the index just
fine.

This patch fix this by adding a check.

[sp: Minor fix to use {link} instead of "link" in condition
and to only open the path if it is not a symlink.]

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

Merge branch 'maint'Junio C Hamano Sun, 9 Sep 2007 09:32:24 +0000 (02:32 -0700)

Merge branch 'maint'

* maint:
git-svn: understand grafts when doing dcommit
git-diff: don't squelch the new SHA1 in submodule diffs
git-svn: fix "Malformed network data" with svn:// servers
(cvs|svn)import: Ask git-tag to overwrite old tags.
Documentation / grammer nit

git-svn: understand grafts when doing dcommitEric Wong Sat, 8 Sep 2007 23:33:08 +0000 (16:33 -0700)

git-svn: understand grafts when doing dcommit

Use the rev-list --parents functionality to read the parents
of the commit. cat-file only shows the raw object with the
original parents and doesn't take into account grafts; so
we'll rely on rev-list machinery for the smarts here.

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

git-diff: don't squelch the new SHA1 in submodule diffsSven Verdoolaege Sat, 8 Sep 2007 10:30:22 +0000 (12:30 +0200)

git-diff: don't squelch the new SHA1 in submodule diffs

The code to squelch empty diffs introduced by commit
fb13227e089f22dc31a3b1624559153821056848 would inadvertently
populate filespec "two" of a submodule change using the uninitialized
(null) SHA1, thereby replacing the submodule SHA1 by 0{40} in the output.

This change teaches diffcore_skip_stat_unmatch to handle
submodule changes correctly.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Avoid use of libdir in MakefileShawn O. Pearce Sun, 9 Sep 2007 03:05:43 +0000 (23:05 -0400)

git-gui: Avoid use of libdir in Makefile

Dmitry V. Levin pointed out that on GNU linux libdir is often used
in Makefiles to mean "/usr/lib" or "/usr/lib64", a directory that
is meant to hold platform-specific binary files. Using a different
libdir meaning here in git-gui's Makefile breaks idomatic expressions
like rpm specifile "make libdir=%_libdir".

Originally I asked that the git.git Makefile undefine libdir before
it calls git-gui's own Makefile but it turns out this is very hard
to do, if not impossible. Renaming our libdir to gg_libdir resolves
this case with a minimum amount of fuss on our part.

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

Define NO_MEMMEM on Darwin as it lacks the functionShawn O. Pearce Sun, 9 Sep 2007 05:09:17 +0000 (01:09 -0400)

Define NO_MEMMEM on Darwin as it lacks the function

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

git-gui: Disable Tk send in all git-gui sessionsShawn O. Pearce Sun, 9 Sep 2007 03:47:00 +0000 (23:47 -0400)

git-gui: Disable Tk send in all git-gui sessions

The Tk designers blessed us with the "send" command, which on X11
will allow anyone who can connect to your X server to evaluate any
Tcl code they desire within any running Tk process. This is just
plain nuts. If git-gui wants someone running Tcl code within it
then would ask someone to supply that Tcl code to it; waiting for
someone to drop any random Tcl code into us is not fantastic idea.

By renaming send to the empty name the procedure will be removed
from the global namespace and Tk will stop responding to random Tcl
evaluation requests sent through the X server. Since there is no
facility to filter these requests it is unlikely that we will ever
consider enabling this command.

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

git-gui: lib/index.tcl: handle files with % in the... Gerrit Pape Fri, 7 Sep 2007 17:16:59 +0000 (17:16 +0000)

git-gui: lib/index.tcl: handle files with % in the filename properly

Steps to reproduce the bug:

$ mkdir repo && cd repo && git init
Initialized empty Git repository in .git/
$ touch 'foo%3Fsuite'
$ git-gui

Then click on the 'foo%3Fsuite' icon to include it in a changeset, a
popup comes with:
'Error: bad field specifier "F"'

Vincent Danjean noticed the problem and also suggested the fix, reported
through
http://bugs.debian.org/441167

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-svn: fix "Malformed network data" with svn:// serversEric Wong Fri, 7 Sep 2007 11:00:40 +0000 (04:00 -0700)

git-svn: fix "Malformed network data" with svn:// servers

We have a workaround for the reparent function not working
correctly on the SVN native protocol servers. This workaround
opens a new connection (SVN::Ra object) to the new
URL/directory.

Since libsvn appears limited to only supporting one connection
at a time, this workaround invalidates the Git::SVN::Ra object
that is $self inside gs_fetch_loop_common(). So we need to
restart that connection once all the fetching is done for each
loop iteration to be able to run get_log() successfully.

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

(cvs|svn)import: Ask git-tag to overwrite old tags.Michael Smith Fri, 7 Sep 2007 21:35:07 +0000 (17:35 -0400)

(cvs|svn)import: Ask git-tag to overwrite old tags.

If the tag was moved in CVS or SVN history, it will be moved in the
imported history as well. Tag history is not tracked.

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

git-rebase: fix -C optionJ. Bruce Fields Fri, 7 Sep 2007 14:20:51 +0000 (10:20 -0400)

git-rebase: fix -C option

The extra shift here causes failure to parse any commandline including
the -C option.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-rebase: support --whitespace=<option>J. Bruce Fields Fri, 7 Sep 2007 14:20:50 +0000 (10:20 -0400)

git-rebase: support --whitespace=<option>

Pass --whitespace=<option> to git-apply. Since git-apply and git-am
expect this, I'm always surprised when I try to give it to git-rebase
and it doesn't work.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation / grammer nitMike Ralphson Fri, 7 Sep 2007 16:43:37 +0000 (17:43 +0100)

Documentation / grammer nit

If we're counting, a smaller number is 'fewer' not 'less'

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

Use strbuf API in cache-tree.cPierre Habouzit Thu, 6 Sep 2007 11:20:11 +0000 (13:20 +0200)

Use strbuf API in cache-tree.c

Should even be marginally faster.

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

Use strbuf API in buitin-rerere.cPierre Habouzit Thu, 6 Sep 2007 11:20:10 +0000 (13:20 +0200)

Use strbuf API in buitin-rerere.c

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

Use strbuf API in apply, blame, commit-tree and diffPierre Habouzit Thu, 6 Sep 2007 11:20:09 +0000 (13:20 +0200)

Use strbuf API in apply, blame, commit-tree and diff

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

mktree: Simplify write_tree() using strbuf APIPierre Habouzit Thu, 6 Sep 2007 11:20:08 +0000 (13:20 +0200)

mktree: Simplify write_tree() using strbuf API

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

fast-import: Use strbuf API, and simplify cmd_data()Pierre Habouzit Thu, 6 Sep 2007 11:20:07 +0000 (13:20 +0200)

fast-import: Use strbuf API, and simplify cmd_data()

This patch features the use of strbuf_detach, and prevent the programmer
to mess with allocation directly. The code is as efficent as before, just
more concise and more straightforward.

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

Simplify strbuf uses in archive-tar.c using strbuf APIPierre Habouzit Thu, 6 Sep 2007 11:20:06 +0000 (13:20 +0200)

Simplify strbuf uses in archive-tar.c using strbuf API

This is just cleaner way to deal with strbufs, using its API rather than
reinventing it in the module (e.g. strbuf_append_string is just the plain
strbuf_addstr function, and it was used to perform what strbuf_addch does
anyways).

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

Rework strbuf API and semantics.Pierre Habouzit Thu, 6 Sep 2007 11:20:05 +0000 (13:20 +0200)

Rework strbuf API and semantics.

The gory details are explained in strbuf.h. The change of semantics this
patch enforces is that the embeded buffer has always a '\0' character after
its last byte, to always make it a C-string. The offs-by-one changes are all
related to that very change.

A strbuf can be used to store byte arrays, or as an extended string
library. The `buf' member can be passed to any C legacy string function,
because strbuf operations always ensure there is a terminating \0 at the end
of the buffer, not accounted in the `len' field of the structure.

A strbuf can be used to generate a string/buffer whose final size is not
really known, and then "strbuf_detach" can be used to get the built buffer,
and keep the wrapping "strbuf" structure usable for further work again.

Other interesting feature: strbuf_grow(sb, size) ensure that there is
enough allocated space in `sb' to put `size' new octets of data in the
buffer. It helps avoiding reallocating data for nothing when the problem the
strbuf helps to solve has a known typical size.

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

git-svn: always use --first-parentLars Hjemli Fri, 7 Sep 2007 00:00:08 +0000 (02:00 +0200)

git-svn: always use --first-parent

This makes git-svn unconditionally invoke git-log with --first-parent when
it is trying to discover its upstream subversion branch and collecting the
commit ids which should be pushed to it with dcommit. The reason for always
using --first-parent is to make git-svn behave in a predictable way when the
ancestry chain contains merges with other git-svn branches.

Since git-svn now always uses 'git-log --first-parent' there is no longer
any need for the --first-parent option to git-svn, so this is removed.

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

archive: rename attribute specfile to export-substRené Scharfe Thu, 6 Sep 2007 16:51:11 +0000 (18:51 +0200)

archive: rename attribute specfile to export-subst

As suggested by Junio and Johannes, change the name of the former
attribute specfile to export-subst to indicate its function rather
than purpose and to make clear that it is not applied to working tree
files.

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

archive: specfile syntax change: "$Format:%PLCHLDR... René Scharfe Thu, 6 Sep 2007 22:34:06 +0000 (00:34 +0200)

archive: specfile syntax change: "$Format:%PLCHLDR$" instead of just "%PLCHLDR" (take 2)

As suggested by Johannes, --pretty=format: placeholders in specfiles
need to be wrapped in $Format:...$ now. This syntax change restricts
the expansion of placeholders and makes it easier to use with files
that contain non-placeholder percent signs.

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

add memmem()René Scharfe Thu, 6 Sep 2007 22:32:54 +0000 (00:32 +0200)

add memmem()

memmem() is a nice GNU extension for searching a length limited string
in another one.

This compat version is based on the version found in glibc 2.2 (GPL 2);
I only removed the optimization of checking the first char by hand, and
generally tried to keep the code simple. We can add it back if memcmp
shows up high in a profile, but for now I prefer to keep it (almost
trivially) simple.

Since I don't really know which platforms beside those with a glibc
have their own memmem(), I used a heuristic: if NO_STRCASESTR is set,
then NO_MEMMEM is set, too.

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

Merge branch 'master' of git://repo.or.cz/git/git-p4Junio C Hamano Thu, 6 Sep 2007 07:05:49 +0000 (00:05 -0700)

Merge branch 'master' of git://repo.or.cz/git/git-p4

* 'master' of git://repo.or.cz/git/git-p4:
git-p4: Added support for automatically importing newly appearing perforce branches.
git-p4: Cleanup; moved the (duplicated) code for turning a branch into a git ref (for example foo -> refs/remotes/p4/<project>/foo) into a separate method.
git-p4: Cleanup; moved the code for the initial #head or revision import into a separate function, out of P4Sync.run.
git-p4: Cleanup; Turn self.revision into a function local variable (it's not used anywhere outside the function).
git-p4: Cleanup; moved the code to import a list of p4 changes using fast-import into a separate member function of P4Sync.
git-p4: Cleanup; moved the code for getting a sorted list of p4 changes for a list of given depot paths into a standalone method.
git-p4: After submission to p4 always synchronize from p4 again (into refs/remotes). Whether to rebase HEAD or not is still left as question to the end-user.
git-p4: Always call 'p4 sync ...' before submitting to Perforce.

basic threaded delta searchNicolas Pitre Thu, 6 Sep 2007 06:13:11 +0000 (02:13 -0400)

basic threaded delta search

this is still rough, hence it is disabled by default. You need to compile
with "make THREADED_DELTA_SEARCH=1 ..." at the moment.

Threading is done on different portions of the object list to be
deltified. This is currently done by spliting the list into n parts and
then a thread is spawned for each of them. A better method would consist
of spliting the list into more smaller parts and have the n threads
pick the next part available.

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

rearrange delta search progress reportingNicolas Pitre Thu, 6 Sep 2007 06:13:10 +0000 (02:13 -0400)

rearrange delta search progress reporting

This is to help threadification of the delta search code, with a bonus
consistency check.

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

localize window memory usage accountingNicolas Pitre Thu, 6 Sep 2007 06:13:09 +0000 (02:13 -0400)

localize window memory usage accounting

This is to help threadification of delta searching.

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

straighten the list of objects to deltifyNicolas Pitre Thu, 6 Sep 2007 06:13:08 +0000 (02:13 -0400)

straighten the list of objects to deltify

Not all objects are subject to deltification, so avoid carrying those
along, and provide the real count to progress display.

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

Merge branch 'maint'Junio C Hamano Thu, 6 Sep 2007 06:37:02 +0000 (23:37 -0700)

Merge branch 'maint'

* maint:
Include a git-push example for creating a remote branch
Cleanup unnecessary file modifications in t1400-update-ref
Makefile: Add cache-tree.h to the headers list
Don't allow contrib/workdir/git-new-workdir to trash existing dirs
git-apply: do not read past the end of buffer

Include a git-push example for creating a remote branchShawn O. Pearce Thu, 6 Sep 2007 04:44:08 +0000 (00:44 -0400)

Include a git-push example for creating a remote branch

Many users get confused when `git push origin master:foo` works
when foo already exists on the remote repository but are confused
when foo doesn't exist as a branch and this form does not create
the branch foo.

This new example highlights the trick of including refs/heads/
in front of the desired branch name to create a branch.

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

Cleanup unnecessary file modifications in t1400-update-refShawn O. Pearce Thu, 6 Sep 2007 02:15:21 +0000 (22:15 -0400)

Cleanup unnecessary file modifications in t1400-update-ref

Kristian Høgsberg pointed out that the two file modifications
we were doing during the 'creating initial files' step are not even
used within the test suite. This was actually confusing as we do
not even need these changes for the tests to pass. All that really
matters here is the specific commit dates are used so that these
appear in the branch's reflog, and that the dates are different so
that the branch will update when asked and the reflog entry is
also updated. There is no need for the file modification.

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

Makefile: Add cache-tree.h to the headers listDmitry V. Levin Wed, 5 Sep 2007 23:22:51 +0000 (03:22 +0400)

Makefile: Add cache-tree.h to the headers list

The dependency was missing.

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

Don't allow contrib/workdir/git-new-workdir to trash... Shawn O. Pearce Thu, 6 Sep 2007 03:33:41 +0000 (23:33 -0400)

Don't allow contrib/workdir/git-new-workdir to trash existing dirs

Recently I found that doing a sequence like the following:

git-new-workdir a b
...
git-new-workdir a b

by accident will cause a (and now also b) to have an infinite cycle
in its refs directory. This is caused by git-new-workdir trying
to create the "refs" symlink over again, only during the second
time it is being created within a's refs directory and is now also
pointing back at a's refs.

This causes confusion in git as suddenly branches are named things
like "refs/refs/refs/refs/refs/refs/refs/heads/foo" instead of the
more commonly accepted "refs/heads/foo". Plenty of commands start
to see ambiguous ref names and others just take ages to compute.

git-clone has the same safety check, so git-new-workdir should
behave just like it.

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

git-apply: do not read past the end of bufferJunio C Hamano Thu, 6 Sep 2007 04:58:40 +0000 (21:58 -0700)

git-apply: do not read past the end of buffer

When the preimage we are patching is shorter than what the patch
text expects, we tried to match the buffer contents at the
"original" line with the fragment in full, without checking we
have enough data to match in the preimage. This caused the size
of a later memmove() to wrap around and attempt to scribble
almost the entire address space. Not good.

The code that follows the part this patch touches tries to match
the fragment with line offsets. Curiously, that code does not
have the problem --- it guards against reading past the end of
the preimage.

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

git-svn: add support for --first-parentLars Hjemli Wed, 5 Sep 2007 09:35:29 +0000 (11:35 +0200)

git-svn: add support for --first-parent

When git-svn uses git-log to find embedded 'git-svn-id'-lines in commit
messages, it can get confused when local history contains merges with
other git-svn branches. But if --first-parent is supplied to git-log,
working_head_info() will only see 'branch-local' commits and thus the
first commit containing a 'git-svn-id' line should refer to the correct
subversion branch.

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

Merge branch 'ds/sendmail'Junio C Hamano Wed, 5 Sep 2007 22:23:36 +0000 (15:23 -0700)

Merge branch 'ds/sendmail'

* ds/sendmail:
send-email: Add support for SSL and SMTP-AUTH

Function for updating refs.Carlos Rica Wed, 5 Sep 2007 01:38:24 +0000 (03:38 +0200)

Function for updating refs.

A function intended to be called from builtins updating refs
by locking them before write, specially those that came from
scripts using "git update-ref".

[jc: with minor fixups]

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

git-gui: Properly set the state of "Stage/Unstage Hunk... Shawn O. Pearce Sun, 2 Sep 2007 19:38:04 +0000 (15:38 -0400)

git-gui: Properly set the state of "Stage/Unstage Hunk" action

Today I found yet another way for the "Stage Hunk" and "Unstage
Hunk" context menu actions to leave the wrong state enabled in
the UI. The problem this time was that I connected the state
determination to the value of $::current_diff_side (the side the
diff is from). When the user was last looking at a diff from the
index side and unstages everything the diff panel goes empty, but
the action stayed enabled as we always assumed unstaging was a
valid action.

This change moves the logic for determining when the action is
enabled away from the individual side selection, as they really
are two unrelated concepts.

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

git-gui: Fix detaching current branch during checkoutShawn O. Pearce Sun, 2 Sep 2007 19:30:26 +0000 (15:30 -0400)

git-gui: Fix detaching current branch during checkout

If the user tried to detach their HEAD while keeping the working
directory on the same commit we actually did not completely do
a detach operation internally. The problem was caused by git-gui
not forcing the HEAD symbolic ref to be updated to a SHA-1 hash
when we were not switching revisions. Now we update the HEAD ref
if we aren't currently detached or the hashes don't match.

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

git-gui: Correct starting of git-remote to handle ... Shawn O. Pearce Sun, 2 Sep 2007 19:19:07 +0000 (15:19 -0400)

git-gui: Correct starting of git-remote to handle -w option

Current versions of git-remote apparently are passing the -w option
to Perl as part of the shbang line:

#!/usr/bin/perl -w

this caused a problem in git-gui and gave the user a Tcl error with
the message: "git-remote not supported: #!/usr/bin/perl -w".

The fix for this is to treat the shbang line as a Tcl list and look
at the first element only for guessing the executable name. Once
we know the executable name we use the remaining elements (if any
exist) as arguments to the executable, before the script filename.

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

Remove unused function convert_sha1_file()René Scharfe Mon, 3 Sep 2007 18:08:01 +0000 (20:08 +0200)

Remove unused function convert_sha1_file()

convert_sha1_file() became unused by the previous patch -- remove it.

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

archive: specfile support (--pretty=format: in archive... René Scharfe Mon, 3 Sep 2007 18:07:01 +0000 (20:07 +0200)

archive: specfile support (--pretty=format: in archive files)

Add support for a new attribute, specfile. Files marked as being
specfiles are expanded by git-archive when they are written to an
archive. It has no effect on worktree files. The same placeholders
as those for the option --pretty=format: of git-log et al. can be
used.

The attribute is useful for creating auto-updating specfiles. It is
limited by the underlying function format_commit_message(), though.
E.g. currently there is no placeholder for git-describe like output,
and expanded specfiles can't contain NUL bytes. That can be fixed
in format_commit_message() later and will then benefit users of
git-log, too.

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

Export format_commit_message()Ren\e,bi\e(B Scharfe Mon, 3 Sep 2007 18:06:36 +0000 (20:06 +0200)

Export format_commit_message()

Drop the parameter "msg" of format_commit_message() (as it can be
inferred from the parameter "commit"), add a parameter "template"
in order to avoid accessing the static variable user_format
directly and export the result.

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

verify-tag: also grok CR/LFs in the tag signatureJohannes Schindelin Mon, 3 Sep 2007 16:51:43 +0000 (17:51 +0100)

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

On some people's favorite platform, gpg outputs signatures
with CR/LF line endings. So verify-tag has to play nice with
them.

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

git-p4: Added support for automatically importing newly... Simon Hausmann Sun, 26 Aug 2007 15:36:55 +0000 (17:36 +0200)

git-p4: Added support for automatically importing newly appearing perforce branches.

If a change in a p4 "branch" appears that hasn't seen any previous commit and
that has a known branch mapping we now try to import it properly. First we
find the p4 change of the source branch that the new p4 branch is based on. Then
we using git rev-list --bisect to locate the corresponding git commit to that change.
Finally we import all changes in the new p4 branch up to the current change and resume
with the regular import.

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: Cleanup; moved the (duplicated) code for turnin... Simon Hausmann Sun, 26 Aug 2007 14:44:55 +0000 (16:44 +0200)

git-p4: Cleanup; moved the (duplicated) code for turning a branch into a git ref (for example foo -> refs/remotes/p4/<project>/foo) into a separate method.

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: Cleanup; moved the code for the initial #head... Simon Hausmann Sun, 26 Aug 2007 14:07:18 +0000 (16:07 +0200)

git-p4: Cleanup; moved the code for the initial #head or revision import into a separate function, out of P4Sync.run.

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: Cleanup; Turn self.revision into a function... Simon Hausmann Sun, 26 Aug 2007 14:04:34 +0000 (16:04 +0200)

git-p4: Cleanup; Turn self.revision into a function local variable (it's not used anywhere outside the function).

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: Cleanup; moved the code to import a list of... Simon Hausmann Sun, 26 Aug 2007 14:00:52 +0000 (16:00 +0200)

git-p4: Cleanup; moved the code to import a list of p4 changes using fast-import into a separate member function of P4Sync.

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: Cleanup; moved the code for getting a sorted... Simon Hausmann Sun, 26 Aug 2007 13:56:36 +0000 (15:56 +0200)

git-p4: Cleanup; moved the code for getting a sorted list of p4 changes for a list of given depot paths into a standalone method.

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: After submission to p4 always synchronize from... Simon Hausmann Wed, 22 Aug 2007 07:07:15 +0000 (09:07 +0200)

git-p4: After submission to p4 always synchronize from p4 again (into refs/remotes). Whether to rebase HEAD or not is still left as question to the end-user.

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: Always call 'p4 sync ...' before submitting... Simon Hausmann Tue, 21 Aug 2007 09:53:02 +0000 (11:53 +0200)

git-p4: Always call 'p4 sync ...' before submitting to Perforce.

Acked-by: Marius Storm-Olsen <marius@trolltech.com>
Acked-by: Thiago Macieira <thiago@kde.org>

Teach "git remote" a mirror modeJohannes Schindelin Sun, 2 Sep 2007 20:10:14 +0000 (21:10 +0100)

Teach "git remote" a mirror mode

When using the "--mirror" option to "git remote add", the refs will not
be stored in the refs/remotes/ namespace, but in the same location as
on the remote side.

This option probably only makes sense in a bare repository.

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

send-email: Add support for SSL and SMTP-AUTHDouglas Stockwell Sun, 2 Sep 2007 18:06:25 +0000 (03:06 +0900)

send-email: Add support for SSL and SMTP-AUTH

Allows username and password to be given using --smtp-user
and --smtp-pass. SSL use is flagged by --smtp-ssl. These are
backed by corresponding defaults in the git configuration file.

This implements Junio's 'mail identity' suggestion in a slightly
more generalised manner. --identity=$identity, backed by
sendemail.identity indicates that the configuration subsection
[sendemail "$identity"] should take priority over the [sendemail]
section for all configuration values.

Signed-off-by: Douglas Stockwell <doug@11011.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Start 1.5.4 cycleJunio C Hamano Mon, 3 Sep 2007 09:40:06 +0000 (02:40 -0700)

Start 1.5.4 cycle

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

GIT 1.5.3.1: obsolete git-p4 in RPM spec file. v1.5.3.1Junio C Hamano Sun, 2 Sep 2007 22:16:44 +0000 (15:16 -0700)

GIT 1.5.3.1: obsolete git-p4 in RPM spec file.

HPA noticed that yum does not like the newer git RPM set; it turns out
that we do not ship git-p4 anymore but existing installations do not
realize the package is gone if we do not tell anything about it.

David Kastrup suggests using Obsoletes in the spec file of the new
RPM to replace the old package, so here is a try.

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

Typofix: 1.5.3 release notesJunio C Hamano Sun, 2 Sep 2007 22:03:26 +0000 (15:03 -0700)

Typofix: 1.5.3 release notes

GIT 1.5.3 v1.5.3Junio C Hamano Sun, 2 Sep 2007 07:00:00 +0000 (00:00 -0700)

GIT 1.5.3

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

Keep last used delta base in the delta windowJunio C Hamano Sun, 2 Sep 2007 06:53:47 +0000 (23:53 -0700)

Keep last used delta base in the delta window

This is based on Martin Koegler's idea to keep the object that
was successfully used as the base of the delta when it is about
to fall off the edge of the window. Instead of doing so only
for the objects at the edge of the window, this makes the window
a lru eviction mechanism. If an entry is used as a base, it is
moved to the last of the queue to be evicted.

This is a quick-and-dirty implementation, as it keeps the original
implementation of the data structure used for the window. This
originally was done as an array, not as an array of pointers,
because it was meant to be used as a cyclic FIFO buffer and a
plain array avoids an extra pointer indirection, while its FIFOness
eant that we are not "moving" the entries like this patch does.

The runtime from three versions were comparable. It seems to
make the resulting chain even shorter, which can only be good.

(stock "master") 15782196 bytes
chain length = 1: 2972 objects
chain length = 2: 2651 objects
chain length = 3: 2369 objects
chain length = 4: 2121 objects
chain length = 5: 1877 objects
...
chain length = 46: 490 objects
chain length = 47: 515 objects
chain length = 48: 527 objects
chain length = 49: 570 objects
chain length = 50: 408 objects

(with your patch) 15745736 bytes (0.23% smaller)
chain length = 1: 3137 objects
chain length = 2: 2688 objects
chain length = 3: 2322 objects
chain length = 4: 2146 objects
chain length = 5: 1824 objects
...
chain length = 46: 503 objects
chain length = 47: 509 objects
chain length = 48: 536 objects
chain length = 49: 588 objects
chain length = 50: 357 objects

(with this patch) 15612086 bytes (1.08% smaller)
chain length = 1: 4831 objects
chain length = 2: 3811 objects
chain length = 3: 2964 objects
chain length = 4: 2352 objects
chain length = 5: 1944 objects
...
chain length = 46: 327 objects
chain length = 47: 353 objects
chain length = 48: 304 objects
chain length = 49: 298 objects
chain length = 50: 135 objects

[jc: this is with code simplification follow-up from Nico]

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

Merge branch 'jp/send-email-cc'Junio C Hamano Sat, 1 Sep 2007 20:15:27 +0000 (13:15 -0700)

Merge branch 'jp/send-email-cc'

* jp/send-email-cc:
git-send-email --cc-cmd

Mention -m as an abbreviation for --mergeRobin Rosenberg Sat, 1 Sep 2007 12:11:10 +0000 (14:11 +0200)

Mention -m as an abbreviation for --merge

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update my contact address as the maintainer.Junio C Hamano Sat, 1 Sep 2007 11:09:51 +0000 (04:09 -0700)

Update my contact address as the maintainer.

Documentation: minor AsciiDoc mark-up fixes.Junio C Hamano Sat, 1 Sep 2007 11:01:54 +0000 (04:01 -0700)

Documentation: minor AsciiDoc mark-up fixes.

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

URL: allow port specification in ssh:// URLsLuben Tuikov Sat, 1 Sep 2007 09:36:31 +0000 (02:36 -0700)

URL: allow port specification in ssh:// URLs

Allow port specification in ssh:// URLs in the
usual notation:

ssh://[user@]host.domain[:<port>]/<path>

This allows git to be used over ssh-tunneling
networks.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>