gitweb.git
fast-import: Fail if a non-existant commit is used... Shawn O. Pearce Mon, 5 Mar 2007 17:43:14 +0000 (12:43 -0500)

fast-import: Fail if a non-existant commit is used for merge

Johannes Sixt noticed during one of his own imports that fast-import
did not fail if a non-existant commit is referenced by SHA-1 value
as an argument to the 'merge' command. This allowed the user to
unknowingly create commits that would fail in fsck, as the commit
contents would not be completely reachable.

A side effect of this bug was that a frontend process could mark
any SHA-1 object (blob, tree, tag) as a parent of a merge commit.
This should also fail in fsck, as the commit is not a valid commit.

We now use the same rule as the 'from' command. If a commit is
referenced in the 'merge' command by hex formatted SHA-1 then the
SHA-1 must be a commit or a tag that can be peeled back to a commit,
the commit must already exist, and must be readable by the core Git
infrastructure code. This requirement means that the commit must
have existed prior to fast-import starting, or the commit must have
been flushed out by a prior 'checkpoint' command.

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

fast-import: Avoid infinite loop after resetShawn O. Pearce Mon, 5 Mar 2007 17:31:09 +0000 (12:31 -0500)

fast-import: Avoid infinite loop after reset

Johannes Sixt noticed that a 'reset' command applied to a branch that
is already active in the branch LRU cache can cause fast-import to
relink the same branch into the LRU cache twice. This will cause
the LRU cache to contain a cycle, making unload_one_branch run in an
infinite loop as it tries to select the oldest branch for eviction.

I have trivially fixed the problem by adding an active bit to
each branch object; this bit indicates if the branch is already
in the LRU and allows us to avoid trying to add it a second time.
Converting the pack_id field into a bitfield makes this change take
up no additional memory.

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

GIT 1.5.0.3 v1.5.0.3Junio C Hamano Mon, 5 Mar 2007 01:20:38 +0000 (17:20 -0800)

GIT 1.5.0.3

Signed-off-by: Junio C Hamano <junkio@cox.net>

glossary: Add definitions for dangling and unreachable... Yasushi SHOJI Sun, 4 Mar 2007 18:07:43 +0000 (03:07 +0900)

glossary: Add definitions for dangling and unreachable objects

Define "dangling" and "unreachable" objects. Modified from original
text proposed by Yasushi Shoji.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

user-manual: more detailed merge discussionJ. Bruce Fields Sat, 3 Mar 2007 20:34:27 +0000 (15:34 -0500)

user-manual: more detailed merge discussion

Add more details on conflict, including brief discussion of file stages.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

user-manual: how to replace commits older than most... J. Bruce Fields Sat, 3 Mar 2007 19:30:32 +0000 (14:30 -0500)

user-manual: how to replace commits older than most recent

"Modifying" an old commit by checking it out, --amend'ing it, then
rebasing on top of it, is a slightly cumbersome technique, but I've
found it useful frequently enough to make it seem worth documenting.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

user-manual: insert earlier of mention content-addressa... J. Bruce Fields Sat, 3 Mar 2007 19:04:42 +0000 (14:04 -0500)

user-manual: insert earlier of mention content-addressable architecture

The content-addressable design is too important not to be worth at least
a brief mention a little earlier on.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

user-manual: ensure generated manual references stylesheetJ. Bruce Fields Sat, 3 Mar 2007 18:33:48 +0000 (13:33 -0500)

user-manual: ensure generated manual references stylesheet

The generated user manual is rather hard to read thanks to the lack of
the css that's supposed to be included from docbook-xsl.css.

I'm totally ignorant of the toolchain; grubbing through xmlto and
related scripts, the easiest way I could find to ensure that the
generated html links to the stylesheet is by calling xsltproc directly.
Maybe there's some better way.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

user-manual: reset to ORIG_HEAD not HEAD to undo mergeJ. Bruce Fields Mon, 19 Feb 2007 23:46:09 +0000 (18:46 -0500)

user-manual: reset to ORIG_HEAD not HEAD to undo merge

As Linus pointed out recently on the mailing list,

git reset --hard HEAD^

doesn't undo a merge in the case where the merge did a fast-forward. So
the rcommendation here is a little dangerous.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation: mention module option to git-cvsimportJ. Bruce Fields Tue, 6 Feb 2007 07:51:26 +0000 (02:51 -0500)

Documentation: mention module option to git-cvsimport

The git-cvsimport argument that specifies a cvs module to import should
probably be included in the default example.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Unset NO_C99_FORMAT on Cygwin.Ramsay Jones Sat, 3 Mar 2007 18:28:39 +0000 (18:28 +0000)

Unset NO_C99_FORMAT on Cygwin.

This should only be set based on the capability of your
compiler/library to support c99 format specifiers. In this
case the version of gcc/newlib and indirectly the version
of Cygwin. It should probably only be set in your config.mak
file.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix a "pointer type missmatch" warning.Ramsay Jones Sat, 3 Mar 2007 18:29:03 +0000 (18:29 +0000)

Fix a "pointer type missmatch" warning.

In particular, the second parameter in the call to iconv() will
cause this warning if your library declares iconv() with the
second (input buffer pointer) parameter of type const char **.
This is the old prototype, which is none-the-less used by the
current version of newlib on Cygwin. (It appears in old versions
of glibc too).

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix some "comparison is always true/false" warnings.Ramsay Jones Sat, 3 Mar 2007 18:28:57 +0000 (18:28 +0000)

Fix some "comparison is always true/false" warnings.

On Cygwin the wchar_t type is an unsigned short (16-bit) int.
This results in the above warnings from the return statement in
the wcwidth() function (in particular, the expressions involving
constants with values larger than 0xffff). Simply replace the
use of wchar_t with an unsigned int, typedef-ed as ucs_char_t.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix an "implicit function definition" warning.Ramsay Jones Sat, 3 Mar 2007 18:28:52 +0000 (18:28 +0000)

Fix an "implicit function definition" warning.

The function at issue being initgroups() from the <grp.h> header
file. On Cygwin, setting _XOPEN_SOURCE suppresses the definition
of initgroups(), which causes the warning while compiling daemon.c.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix a "label defined but unreferenced" warning.Ramsay Jones Sat, 3 Mar 2007 18:28:46 +0000 (18:28 +0000)

Fix a "label defined but unreferenced" warning.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Document the config variable format.suffixJohannes Schindelin Sat, 3 Mar 2007 23:17:23 +0000 (00:17 +0100)

Document the config variable format.suffix

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-merge: fail correctly when we cannot fast forward.Junio C Hamano Sat, 3 Mar 2007 21:04:54 +0000 (13:04 -0800)

git-merge: fail correctly when we cannot fast forward.

When we cannot fast forward the working tree and the current
branch, git-merge did not exit with non-zero status.

Noticed by Larry Streepy, the section to be fixed identfied by
Johannes Schindelin.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-archive: use RUN_SETUPJohannes Schindelin Sat, 3 Mar 2007 16:14:25 +0000 (17:14 +0100)

builtin-archive: use RUN_SETUP

It used to roll its own setup.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix git-gc usage noteMatthias Kestenholz Sat, 3 Mar 2007 17:28:14 +0000 (18:28 +0100)

Fix git-gc usage note

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix quoting in update hook templateGerrit Pape Fri, 2 Mar 2007 12:20:10 +0000 (12:20 +0000)

Fix quoting in update hook template

By default allowunannotated is unset in the repo config, hence
$allowunannotated is empty, and must be quoted to not break the syntax.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Another memory overrun in http-push.cEygene Ryabinkin Thu, 1 Mar 2007 16:09:12 +0000 (19:09 +0300)

Another memory overrun in http-push.c

Use of strlcpy() are wrong, as the source buffer at these
locations may not be NUL-terminated.

fetch.o depends on the headers, too.Johannes Schindelin Tue, 27 Feb 2007 23:55:48 +0000 (00:55 +0100)

fetch.o depends on the headers, too.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation: Correct minor typo in git-add documentation.Christian Schlotter Thu, 1 Mar 2007 17:08:17 +0000 (18:08 +0100)

Documentation: Correct minor typo in git-add documentation.

Signed-off-by: Christian Schlotter <schlotter@users.sourceforge.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation/git-send-email.txt: Fix labeled list... Sergey Vlasov Thu, 1 Mar 2007 19:41:16 +0000 (22:41 +0300)

Documentation/git-send-email.txt: Fix labeled list formatting

Mark continuation paragraphs of list entries as such to avoid
getting literal paragraphs instead.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation/git-quiltimport.txt: Fix labeled list... Sergey Vlasov Thu, 1 Mar 2007 19:41:15 +0000 (22:41 +0300)

Documentation/git-quiltimport.txt: Fix labeled list formatting

Mark the continuation paragraph of a list entry as such to avoid
getting a literal paragraph instead.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation/build-docdep.perl: Fix dependencies for... Sergey Vlasov Thu, 1 Mar 2007 19:41:14 +0000 (22:41 +0300)

Documentation/build-docdep.perl: Fix dependencies for included asciidoc files

Adding dependencies on included files to the generated man pages is
wrong - includes are processed by asciidoc, therefore the intermediate
Docbook XML files really depend on included files. Because of these
wrong dependencies the man pages were not rebuilt properly if the
intermediate XML files were left in the tree.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Start preparing Release Notes for 1.5.0.3Junio C Hamano Wed, 28 Feb 2007 22:17:45 +0000 (14:17 -0800)

Start preparing Release Notes for 1.5.0.3

Documentation: git-remote add [-t <branch>] [-m <branch... Junio C Hamano Wed, 28 Feb 2007 22:05:42 +0000 (14:05 -0800)

Documentation: git-remote add [-t <branch>] [-m <branch>] [-f] name url

Signed-off-by: Junio C Hamano <junkio@cox.net>

Include config.mak in doc/MakefileUwe Kleine-König Wed, 28 Feb 2007 20:57:42 +0000 (21:57 +0100)

Include config.mak in doc/Makefile

config.mak.autogen is already there. Without this change it is not
possible to override mandir in config.mak.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git.el: Set the default commit coding system from the... Alexandre Julliard Wed, 28 Feb 2007 19:59:48 +0000 (20:59 +0100)

git.el: Set the default commit coding system from the repository config.

If not otherwise specified, take the default coding system for commits
from the 'i18n.commitencoding' repository configuration value.

Also set the buffer-file-coding-system variable in the log buffer to
make the selected coding system visible on the modeline.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-archimport: support empty summaries, put summary... Paolo Bonzini Wed, 28 Feb 2007 20:02:02 +0000 (21:02 +0100)

git-archimport: support empty summaries, put summary on a single line.

Don't fail if the summary line in an arch commit is empty. In this case,
try to use the first line in the commit message followed by an ellipsis.
In addition, if the summary is multi-line, it is joined on a single line.

Signed-off-by: Junio C Hamano <junkio@cox.net>

http-push.c::lock_remote(): validate all remote refs.Eygene Ryabinkin Wed, 28 Feb 2007 20:12:02 +0000 (12:12 -0800)

http-push.c::lock_remote(): validate all remote refs.

Starting from offset 11 might have been good back when it was
only used for updating "refs/heads/*", but it is used to update
"info/refs" and "refs/tags/*" as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-cvsexportcommit: don't cleanup .msg if not yet... Gerrit Pape Wed, 28 Feb 2007 12:35:39 +0000 (12:35 +0000)

git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.

Unless the -c option is given, and the commit to cvs was successful,
.msg shouldn't be deleted to be able to run the command suggested by
git-cvsexportcommit.

See http://bugs.debian.org/412732

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-fmt-merge-msg: fix bugs in --file optionMichael Coleman Wed, 28 Feb 2007 05:44:42 +0000 (23:44 -0600)

builtin-fmt-merge-msg: fix bugs in --file option

If --file's argument is missing, don't crash. If it cannot be opened,
die with an error message.

Signed-off-by: Junio C Hamano <junkio@cox.net>

index-pack: Loop over pread until data loading is complete.Shawn O. Pearce Wed, 28 Feb 2007 04:47:19 +0000 (23:47 -0500)

index-pack: Loop over pread until data loading is complete.

A filesystem might not be able to completely supply our pread
request in one system call, such as if we are reading data from a
network file system and the requested length is just simply huge.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

blameview: Fix the browse behavior in blameviewAneesh Kumar Mon, 26 Feb 2007 08:31:57 +0000 (14:01 +0530)

blameview: Fix the browse behavior in blameview

Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix minor typos/grammar in user-manual.txtMichael Coleman Wed, 28 Feb 2007 04:13:09 +0000 (22:13 -0600)

Fix minor typos/grammar in user-manual.txt

Signed-off-by: Junio C Hamano <junkio@cox.net>

Correct ordering in git-cvsimport's option documentationMichael Poole Wed, 28 Feb 2007 03:27:44 +0000 (22:27 -0500)

Correct ordering in git-cvsimport's option documentation

A pair of commits on January 8th added option documentation (for -a,
-S and -L) in the middle of the documentation for the -A option. This
makes -A's documentation contiguous again.

Signed-off-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-show: Reject native refLinus Torvalds Wed, 28 Feb 2007 00:22:52 +0000 (16:22 -0800)

git-show: Reject native ref

So when we do

git show v1.4.4..v1.5.0

that's an illogical thing to do, since "git show" is defined to be a
non-revision-walking action, which means the range operator be pointless
and wrong. The fact that we happily accept it (and then _only_ show
v1.5.0, which is the positive end of the range) is quite arguably not very
logical.

We should complain, and say that you can only do "no_walk" with positive
refs. Negative object refs really don't make any sense unless you walk
the obejct list (or you're "git diff" and know about ranges explicitly).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix git-show man page formatting in the EXAMPLES sectionTheodore Tso Tue, 27 Feb 2007 15:43:28 +0000 (10:43 -0500)

Fix git-show man page formatting in the EXAMPLES section

Fix asciidoc markup so that the man page is properly formatted in the
EXAMPLES section.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-apply: do not fix whitespaces on context lines.Junio C Hamano Tue, 27 Feb 2007 09:31:42 +0000 (01:31 -0800)

git-apply: do not fix whitespaces on context lines.

Internal function apply_line() is called to copy both context lines
and added lines to the output buffer, while possibly fixing the
whitespace breakages depending on --whitespace=strip settings.
However, it did its fix-up on both context lines and added lines.

This resulted in two symptoms:

(1) The number of lines reported to have been fixed up included
these context lines.

(2) However, the lines actually shown were limited to the added
lines that had whitespace breakages.

Signed-off-by: Junio C Hamano <junkio@cox.net>

diff --cc: integer overflow given a 2GB-or-larger fileJim Meyering Mon, 26 Feb 2007 23:11:35 +0000 (00:11 +0100)

diff --cc: integer overflow given a 2GB-or-larger file

Few of us use git to compare or even version-control 2GB files,
but when we do, we'll want it to work.

Reading a recent patch, I noticed two lines like this:

int len = st.st_size;

Instead of "int", that should be "size_t". Otherwise, in the
non-symlink case, with 64-bit size_t, if the file's size is 2GB,
the following xmalloc will fail:

result = xmalloc(len + 1);

trying to allocate 2^64 - 2^31 + 1 bytes (assuming sign-extension
in the int-to-size_t promotion). And even if it didn't fail, the
subsequent "result[len] = 0;" would be equivalent to an unpleasant
"result[-2147483648] = 0;"

The other nearby "int"-declared size variable, sz, should also be of
type size_t, for the same reason. If sz ever wraps around and becomes
negative, xread will corrupt memory _before_ the "result" buffer.

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

mailinfo: do not get confused with logical lines that... Linus Torvalds Mon, 26 Feb 2007 19:10:59 +0000 (11:10 -0800)

mailinfo: do not get confused with logical lines that are too long.

It basically considers all the continuation lines to be lines of their
own, and if the total line is bigger than what we can fit in it, we just
truncate the result rather than stop in the middle and then get confused
when we try to parse the "next" line (which is just the remainder of the
first line).

[jc: added test, and tightened boundary a bit per list discussion.]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

GIT 1.5.0.2 v1.5.0.2Junio C Hamano Mon, 26 Feb 2007 07:58:50 +0000 (23:58 -0800)

GIT 1.5.0.2

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-remote: support remotes with a dot in the namePavel Roskin Wed, 21 Feb 2007 05:03:36 +0000 (00:03 -0500)

git-remote: support remotes with a dot in the name

[jc: the original from Pavel was limiting the variable names to only
fetch and url, but I loosened it to take valid variable names.]
[jc: cherry-picked from 'master', since people seem to be reinventing
this many times.]

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation: describe "-f/-t/-m" options to "git... Junio C Hamano Mon, 26 Feb 2007 07:26:11 +0000 (23:26 -0800)

Documentation: describe "-f/-t/-m" options to "git-remote add"

Signed-off-by: Junio C Hamano <junkio@cox.net>

diff --cc: fix display of symlink conflicts during... Junio C Hamano Mon, 26 Feb 2007 06:24:47 +0000 (22:24 -0800)

diff --cc: fix display of symlink conflicts during a merge.

"git-diff-files --cc" to show conflicts during merge did not pass
the correct mode information for the working tree down, and showed
bogus combined diff.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'jc/merge-symlink' into maintJunio C Hamano Mon, 26 Feb 2007 03:09:59 +0000 (19:09 -0800)

Merge branch 'jc/merge-symlink' into maint

* jc/merge-symlink:
merge-recursive: fix longstanding bug in merging symlinks
merge-index: fix longstanding bug in merging symlinks

merge-recursive: fix longstanding bug in merging symlinksJunio C Hamano Mon, 26 Feb 2007 02:42:07 +0000 (18:42 -0800)

merge-recursive: fix longstanding bug in merging symlinks

Commit 3af244ca added unlink(2) before running symlink(2) to
update the working tree with the merge result, but it was
unlinking a wrong path. This resulted in loss of the path
pointed by a symlink.

Signed-off-by: Junio C Hamano <junkio@cox.net>

merge-index: fix longstanding bug in merging symlinksJunio C Hamano Mon, 26 Feb 2007 02:17:15 +0000 (18:17 -0800)

merge-index: fix longstanding bug in merging symlinks

Ancient commit e2b6a9d0 added code to pass "file modes" from
merge-index to merge-one-file, and then later commit 54dd99a1
wanted to make sure we do not end up creating a nonsense symlink
that points at a path whose name contains conflict markers.

However, nobody noticed that the code in merge-index added by
e2b6a9d0 were stripping the S_IFMT bits and the code in 54dd99a1
was meaningless. This fixes it.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Add Release Notes to prepare for 1.5.0.2Junio C Hamano Sun, 25 Feb 2007 18:53:42 +0000 (10:53 -0800)

Add Release Notes to prepare for 1.5.0.2

Signed-off-by: Junio C Hamano <junkio@cox.net>

Allow arbitrary number of arguments to git-pack-objectsRoland Dreier Sun, 25 Feb 2007 17:34:27 +0000 (09:34 -0800)

Allow arbitrary number of arguments to git-pack-objects

If a repository ever gets in a situation where there are too many
packs (more than 60 or so), perhaps because of frequent use of
git-fetch -k or incremental git-repack, then it becomes impossible to
fully repack the repository with git-repack -a. That command just
dies with the cryptic message

fatal: too many internal rev-list options

This message comes from git-pack-objects, which is passed one command
line option like --unpacked=pack-<SHA1>.pack for each pack file to be
repacked. However, the current code has a static limit of 64 command
line arguments and just aborts if more arguments are passed to it.

Fix this by dynamically allocating the array of command line
arguments, and doubling the size each time it overflows.

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

rerere: do not deal with symlinks.Junio C Hamano Sun, 25 Feb 2007 09:29:43 +0000 (01:29 -0800)

rerere: do not deal with symlinks.

Who would use multi-line symlinks that would benefit from rerere?
Just ignore them.

Signed-off-by: Junio C Hamano <junkio@cox.net>

rerere: do not skip two conflicted paths next to each... Junio C Hamano Sun, 25 Feb 2007 09:24:34 +0000 (01:24 -0800)

rerere: do not skip two conflicted paths next to each other.

The code forgot to take the for (;;) loop control into account,
incrementing the index once too many.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge git://repo.or.cz/git-gui into maintJunio C Hamano Sun, 25 Feb 2007 07:33:12 +0000 (23:33 -0800)

Merge git://repo.or.cz/git-gui into maint

* git://repo.or.cz/git-gui:
Don't modify CREDITS-FILE if it hasn't changed.

Don't modify CREDITS-FILE if it hasn't changed.Junio C Hamano Sun, 25 Feb 2007 07:18:11 +0000 (02:18 -0500)

Don't modify CREDITS-FILE if it hasn't changed.

We should always avoid rewriting a built file during `make install`
if nothing has changed since `make all`. This is to help support
the typical installation process of compiling a package as yourself,
then installing it as root.

Forcing CREDITS-FILE to be always be rebuilt in the Makefile means
that CREDITS-GEN needs to check for a change and only update
CREDITS-FILE if the file content actually differs. After all,
content is king in Git.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

diff-patch: Avoid emitting double-slashes in textual... Junio C Hamano Fri, 23 Feb 2007 11:44:30 +0000 (03:44 -0800)

diff-patch: Avoid emitting double-slashes in textual patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Reword git-am 3-way fallback failure message.Junio C Hamano Sat, 24 Feb 2007 09:05:27 +0000 (01:05 -0800)

Reword git-am 3-way fallback failure message.

When the blobs recorded on the index lines in the patch as pre-image
blobs are not found in the repository, "git-am" punted saying
that the index line does not record anything useful. This was not
clear enough -- the index line does have something useful but the
problem was that it was not useful in _that_ repository.

Reword the message as Francis Moreau suggests.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Limit filename for format-patchRobin Rosenberg Fri, 23 Feb 2007 22:27:58 +0000 (23:27 +0100)

Limit filename for format-patch

Badly formatted commits may have very long comments. This causes
git-format-patch to fail. To avoid that, truncate the filename
to a value we believe will always work.

Err out if the patch file cannot be created.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

core.legacyheaders: Use the description used in RelNote... Santi Béjar Fri, 23 Feb 2007 16:03:43 +0000 (17:03 +0100)

core.legacyheaders: Use the description used in RelNotes-1.5.0

It explains what it does and why, and says how to use the new format.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-show-ref --verify: Fail if called without a referenceDmitry V. Levin Fri, 23 Feb 2007 17:12:33 +0000 (20:12 +0300)

git-show-ref --verify: Fail if called without a reference

builtin-show-ref.c (cmd_show_ref): Fail if called with --verify option but
without a reference.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-diff: fix combined diffJohannes Schindelin Fri, 23 Feb 2007 04:20:32 +0000 (05:20 +0100)

git-diff: fix combined diff

The code forgets that typecast binds tighter than addition, in
other words:

(cast *)array + i === ((cast *)array) + i

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix 'git commit -a' in a newly initialized repositoryFredrik Kuivinen Thu, 22 Feb 2007 20:28:12 +0000 (21:28 +0100)

Fix 'git commit -a' in a newly initialized repository

With current git:

$ git init
$ git commit -a
cp: cannot stat `.git/index': No such file or directory

Output a nice error message instead.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Include git-gui credits file in dist.Shawn O. Pearce Thu, 22 Feb 2007 04:49:51 +0000 (23:49 -0500)

Include git-gui credits file in dist.

The Makefile for the git-gui subproject will fail to execute if run
outside of a git.git directory, such as when building from a .tar.gz
or .tar.bz2. This is because it is looking for the credits file,
which was created but omitted from the tarball by the toplevel
Makefile.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Document the new core.bare configuration option.Shawn O. Pearce Wed, 21 Feb 2007 22:59:08 +0000 (17:59 -0500)

Document the new core.bare configuration option.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'master' of git://repo.or.cz/git-gui into... Junio C Hamano Wed, 21 Feb 2007 19:09:57 +0000 (11:09 -0800)

Merge branch 'master' of git://repo.or.cz/git-gui into maint

* 'master' of git://repo.or.cz/git-gui:
git-gui: Don't crash in citool mode on initial commit.
git-gui: Remove TODO list.
git-gui: Include browser in our usage message.
git-gui: Change summary of git-gui.
git-gui: Display all authors of git-gui.
git-gui: Use mixed path for docs on Cygwin.
git-gui: Correct crash when saving options in blame mode.
git-gui: Expose the browser as a subcommand.
git-gui: Create new branches from a tag.
git-gui: Prefer version file over git-describe.
git-gui: Print version on the console.
git-gui: More consistently display the application name.
git-gui: Permit merging tags into the current branch.
git-gui: Basic version check to ensure git 1.5.0 or later is used.
git-gui: Refactor 'exec git subcmd' idiom.

Use gunzip -c over gzcat in import-tars example.Michael Loeffler Wed, 14 Feb 2007 16:03:12 +0000 (17:03 +0100)

Use gunzip -c over gzcat in import-tars example.

Not everyone has gzcat or bzcat installed on their system, but
gunzip -c and bunzip2 -c perform the same task and are available
if the user has installed gzip support or bzip2 support.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Don't crash in citool mode on initial commit. gitgui-0.6.1Shawn O. Pearce Wed, 21 Feb 2007 06:33:59 +0000 (01:33 -0500)

git-gui: Don't crash in citool mode on initial commit.

Attempting to use `git citool` to create an initial commit caused
git-gui to crash with a Tcl error as it tried to add the newly
born branch to the non-existant branch menu. Moving this code
to after the normal commit cleanup logic resolves the issue, as
we only have a branch menu if we are not in singlecommit mode.

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

git-gui: Remove TODO list.Shawn O. Pearce Wed, 21 Feb 2007 06:29:05 +0000 (01:29 -0500)

git-gui: Remove TODO list.

I'm apparently not very good at keeping my own TODO file current.
I its also somewhat strange to keep the TODO list as part of the
software branch, as its meta-information that is not directly
related to the code. I'm pulling the TODO list from git-gui and
moving it into a seperate branch.

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

git-gui: Include browser in our usage message.Shawn O. Pearce Wed, 21 Feb 2007 06:24:57 +0000 (01:24 -0500)

git-gui: Include browser in our usage message.

Now that the 'browser' subcommand can be used to startup the tree
browser, it should be listed as a possible subcommand option in
our usage message.

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

git-gui: Change summary of git-gui.Shawn O. Pearce Mon, 19 Feb 2007 02:08:04 +0000 (21:08 -0500)

git-gui: Change summary of git-gui.

Since git-gui does more than create commits, it is unfair to call
it "a commit creation tool". Instead lets just call it a graphical
user interface.

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

git-gui: Display all authors of git-gui.Shawn O. Pearce Mon, 19 Feb 2007 02:06:48 +0000 (21:06 -0500)

git-gui: Display all authors of git-gui.

Now that git-gui has been released to the public as part of Git 1.5.0
I am starting to see some work from other people beyond myself and
Paul. Consequently the copyright for git-gui is not strictly the
two of us anymore, and these others deserve to have some credit
given to them.

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

git-gui: Use mixed path for docs on Cygwin.Shawn O. Pearce Mon, 19 Feb 2007 00:06:09 +0000 (19:06 -0500)

git-gui: Use mixed path for docs on Cygwin.

The Firefox browser requires that a URL use / to delimit directories.
This is instead of \, as \ gets escaped by the browser into its hex
escape code and then relative URLs are incorrectly resolved, Firefox
no longer sees the directories for what they are. Since we are
handing the browser a true URL, we better use the standard / for
directories.

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

Check for PRIuMAX rather than NO_C99_FORMAT in fast... Jason Riedy Wed, 21 Feb 2007 01:34:56 +0000 (17:34 -0800)

Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c.

Thanks to Simon 'corecode' Schubert <corecode@fs.ei.tum.de> for
the clean-up. Defining the C99 standard PRIuMAX when necessary
replaces UM_FMT and the awkward UM10_FMT. There are no direct
C99 translations for other uses of NO_C99_FORMAT in git, alas.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Obey NO_C99_FORMAT in fast-import.c.Jason Riedy Tue, 20 Feb 2007 00:27:09 +0000 (16:27 -0800)

Obey NO_C99_FORMAT in fast-import.c.

Define UM_FMT and UM10_FMT and use in place of %ju and %10ju,
respectively. Both format as unsigned long long, so this
assumes the compiler supports long long.

Signed-off-by: Jason Riedy <jason@acm.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Add a compat/strtoumax.c for Solaris 8.Jason Riedy Tue, 20 Feb 2007 00:22:56 +0000 (16:22 -0800)

Add a compat/strtoumax.c for Solaris 8.

Solaris 8 was pre-c99, and they weren't willing to commit to
the strtoumax definition according to /usr/include/inttypes.h.

This adds NO_STRTOUMAX and NO_STRTOULL for ancient systems.
If NO_STRTOUMAX is defined, the routine in compat/strtoumax.c
will be used instead. That routine passes its arguments to
strtoull unless NO_STRTOULL is defined. If NO_STRTOULL, then
the routine uses strtoul (unsigned long).

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Acked-by: Shawn O Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-clone: Sync documentation to usage note.Christian Schlotter Mon, 19 Feb 2007 12:35:35 +0000 (13:35 +0100)

git-clone: Sync documentation to usage note.

Documentation advertises the new `--depth <n>' parameter with an equal
sign, while the usage notes (shown after `git-clone --help') do not. If I
understood git-clone's source code correctly, the version without the
equal sign is correct, which is why this patch syncs documentation to the
usage note.

Signed-off-by: Christian Schlotter <schlotter@users.sourceforge.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

GIT 1.5.0.1 v1.5.0.1Junio C Hamano Mon, 19 Feb 2007 00:18:43 +0000 (16:18 -0800)

GIT 1.5.0.1

Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation/i18n.txt: it is i18n.commitencoding not... Fredrik Kuivinen Sun, 18 Feb 2007 09:36:51 +0000 (10:36 +0100)

Documentation/i18n.txt: it is i18n.commitencoding not core.commitencoding

Similarly for i18n.logoutputencoding.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Read the config in rev-listFredrik Kuivinen Sun, 18 Feb 2007 09:36:22 +0000 (10:36 +0100)

Read the config in rev-list

Otherwise "git rev-list --header HEAD" will not do the right
thing if i18n.commitencoding is set.

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: Correct crash when saving options in blame... Shawn O. Pearce Sun, 18 Feb 2007 07:12:32 +0000 (02:12 -0500)

git-gui: Correct crash when saving options in blame mode.

Martin Waitz noticed that git-gui crashed while saving the user's
options out if the application was started in blame mode. This
was caused by the do_save_config procedure invoking reshow_diff
incase the number of context lines was modified by the user.
Because we bypassed main window UI setup to enter blame mode we
did not set many of the globals which were accessed by reshow_diff,
and reading unset variables is an error in Tcl.

Aside from moving the globals to be set earlier, I also modified
reshow_diff to not invoke clear_diff if there is no path currently
in the diff viewer. This way reshow_diff does not crash when in
blame mode due to the $ui_diff command not being defined.

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

Update draft release notes for 1.5.0.1Junio C Hamano Sat, 17 Feb 2007 23:47:46 +0000 (15:47 -0800)

Update draft release notes for 1.5.0.1

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge git://git./pub/scm/gitk/gitk into maintJunio C Hamano Sun, 18 Feb 2007 00:13:08 +0000 (16:13 -0800)

Merge git://git./pub/scm/gitk/gitk into maint

* git://git.kernel.org/pub/scm/gitk/gitk:
Make gitk save and restore window pane position on Linux and Cygwin.
Make gitk save and restore the user set window position.
[PATCH] gitk: Use show-ref instead of ls-remote
[PATCH] Make gitk work reasonably well on Cygwin.
[PATCH] gitk - remove trailing whitespace from a few lines.
Change git repo-config to git config

Convert update-index references in docs to add.Shawn O. Pearce Sat, 17 Feb 2007 09:43:42 +0000 (04:43 -0500)

Convert update-index references in docs to add.

Since `git add` is the approved porcelain for an end-user to invoke
when they want to manipulate the index, porcelain documentation
should steer the user to this command rather than the pure plumbing
update-index.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Attempt to improve git-rebase lead-in description.Shawn O. Pearce Sat, 17 Feb 2007 09:31:50 +0000 (04:31 -0500)

Attempt to improve git-rebase lead-in description.

It was mentioned on #git this morning that the lead-in description
of git-rebase is very confusing. Too many branch this and branch
that in a very short run of text.

This new description attempts to walk the user through the command
syntax, while also describing exactly what git-rebase is doing to
their repository.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Do not take mode bits from index after type change.Junio C Hamano Sat, 17 Feb 2007 06:43:48 +0000 (22:43 -0800)

Do not take mode bits from index after type change.

When we do not trust executable bit from lstat(2), we copied
existing ce_mode bits without checking if the filesystem object
is a regular file (which is the only thing we apply the "trust
executable bit" business) nor if the blob in the index is a
regular file (otherwise, we should do the same as registering a
new regular file, which is to default non-executable).

Noticed by Johannes Sixt.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-blame: prevent argument parsing segfaultTommi Kyntola Fri, 16 Feb 2007 08:50:58 +0000 (10:50 +0200)

git-blame: prevent argument parsing segfault

The 3rd branch in builtin-blame.c should also check for lacking
arguments. Running that in top dir does not trigger the problem
because the 'prefix' is NULL.

Signed-off-by: Tommi Kyntola <tommi.kyntola@ray.fi>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-merge: minor fix for no_trivial_merge_strategies.Junio C Hamano Fri, 16 Feb 2007 23:08:25 +0000 (15:08 -0800)

git-merge: minor fix for no_trivial_merge_strategies.

The shell loop to determine if we should skip the trivial
in-index merge stage based on what strategy is given was not
prepared to have more than one strategy listed in the variable
$no_trivial_merge_strategies.

This does not trigger unless you use a modified git but the fix
is simple and straightforward, so let's fix it before 1.5.0.1.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: Expose the browser as a subcommand.Shawn O. Pearce Fri, 16 Feb 2007 05:24:03 +0000 (00:24 -0500)

git-gui: Expose the browser as a subcommand.

Some users may find being able to browse around an arbitrary
branch to be handy, so we now expose our graphical browser
through `git gui browse <committish>`.

Yes, I'm being somewhat lazy and making the user give us
the name of the branch to browse. They can always enter
HEAD.

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

pretend-sha1: grave bugfix.Junio C Hamano Fri, 16 Feb 2007 01:02:06 +0000 (17:02 -0800)

pretend-sha1: grave bugfix.

We stashed away objects that we pretend to have, but did not save the
actual data.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: Create new branches from a tag.Martin Koegler Thu, 15 Feb 2007 06:28:34 +0000 (01:28 -0500)

git-gui: Create new branches from a tag.

I'm missing the possibility to base a new branch on a tag.
The following adds a tag drop down to the new branch dialog.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

GIT-VERSION-FILE: check ./version first.Junio C Hamano Wed, 14 Feb 2007 19:33:04 +0000 (11:33 -0800)

GIT-VERSION-FILE: check ./version first.

When somebody else extracts git tarball inside a larger project,
'git describe' would reported the version number of that upper
level project.

Sometimes, using the consistent versioning across subdirectories
of a larger project is useful, but it may not always be the
right thing to do.

This changes the script to check ./vertion file first, and then
fall back to "git describe". This way, by default, tarball
distribution will get our own version. If the upper level wants
to use consistent versioning across its subdirectories, its
Makefile can overwrite ./version file to force whatever version
number they want to give us before descending into us.

Signed-off-by: Junio C Hamano <junkio@cox.net>

sha1_file.c: Round the mmap offset to half the window... Alexandre Julliard Wed, 14 Feb 2007 17:11:40 +0000 (18:11 +0100)

sha1_file.c: Round the mmap offset to half the window size.

This ensures that a given area is mapped at most twice, and greatly
reduces the virtual address space usage.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Make gitk save and restore window pane position on... Mark Levedahl Tue, 13 Feb 2007 00:19:34 +0000 (19:19 -0500)

Make gitk save and restore window pane position on Linux and Cygwin.

Subtle bugs remained on both Cygwin and Linux that caused the various
window panes to be restored in positions different than where the user
last placed them. Sergey Vlasov posed a pair of suggested fixes to this,
what is done here is slightly different. The basic fix here involves
a) explicitly remembering and restoring the sash positions for the upper
window, and b) using paneconfigure to redundantly set height and width of
other elements. This redundancy is needed as Cygwin Tcl has a nasty habit
of setting pane sizes to zero if their slaves are not configured with a
specific size, but Linux Tcl does not honor the specific size given.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Make gitk save and restore the user set window position.Mark Levedahl Fri, 9 Feb 2007 03:22:24 +0000 (22:22 -0500)

Make gitk save and restore the user set window position.

gitk was saving widget sizes and positions when the main window was
destroyed, which is after all child widgets are destroyed. The cure
is to trap the WM_DELETE_WINDOW event before the gui is torn down. Also,
the saved geometry was captured using "winfo geometry .", rather than
"wm geometry ." Under Linux, these two return different answers and the
latter one is correct.

[jc: credit goes to Brett Schwarz for suggesting the use of "wm protocol";
I also squashed the follow-up patch to remove extraneous -0
from expressions.]

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

[PATCH] gitk: Use show-ref instead of ls-remoteJunio C Hamano Tue, 30 Jan 2007 05:53:28 +0000 (21:53 -0800)

[PATCH] gitk: Use show-ref instead of ls-remote

It used to be ls-remote on self was the only easy way to grab
the ref information. Now we have show-ref which does not
involve fork and IPC, so use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

[PATCH] Make gitk work reasonably well on Cygwin.Junio C Hamano Thu, 1 Feb 2007 13:46:38 +0000 (08:46 -0500)

[PATCH] Make gitk work reasonably well on Cygwin.

The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window sashes
to get a useable layout. However, if ~/.gitk existed, this was not possible
at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous bugs
in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
Again, this is necessary to get around a layout problem on Cygwin.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

[PATCH] gitk - remove trailing whitespace from a few... Mark Levedahl Thu, 1 Feb 2007 13:44:46 +0000 (08:44 -0500)

[PATCH] gitk - remove trailing whitespace from a few lines.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Change git repo-config to git configPaul Mackerras Wed, 14 Feb 2007 21:54:34 +0000 (08:54 +1100)

Change git repo-config to git config

This is the gitk part of e0d10e1c63bc52b37bbec99b07deee794058d9b4
from Tom Prince.

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

Make sure packedgitwindowsize is multiple of (pagesize... Junio C Hamano Wed, 14 Feb 2007 21:20:41 +0000 (13:20 -0800)

Make sure packedgitwindowsize is multiple of (pagesize * 2)

The next patch depends on this.

Signed-off-by: Junio C Hamano <junkio@cox.net>