gitweb.git
Refactor run_update_hook to be more usefulShawn O. Pearce Wed, 7 Mar 2007 21:51:09 +0000 (16:51 -0500)

Refactor run_update_hook to be more useful

This is a simple refactoring of run_update_hook to allow the function
to be passed the name of the hook it runs and also to build the
argument list from a list of struct commands, rather than just one
struct command.

The refactoring is to support new pre-receive and post-receive
hooks that will be given the entire list of struct commands,
rather than just one struct command. These new hooks will follow
in another patch.

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

Don't run post-update hook unless a ref changedShawn O. Pearce Wed, 7 Mar 2007 21:50:43 +0000 (16:50 -0500)

Don't run post-update hook unless a ref changed

There is little point in executing the post-update hook if all refs
had an error and were unable to be updated. In this case nothing
new is reachable within the repository, and there is no state change
for the post-update hook to be interested in.

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

Move post-update hook to after all other activityShawn O. Pearce Wed, 7 Mar 2007 21:50:24 +0000 (16:50 -0500)

Move post-update hook to after all other activity

As the post-update hook is meant to run after we have completed the
receipt of the pushed changes, and it might actually try to kick off
a `repack -a -d`, we should delay on invoking it until after we have
removed the *.keep file on the uploaded pack (if we kept the pack).

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

Merge branch 'maint'Junio C Hamano Wed, 7 Mar 2007 22:45:25 +0000 (14:45 -0800)

Merge branch 'maint'

* maint:
Catch write_ref_sha1 failure in receive-pack
make t8001 work on Mac OS X again

Cast 64 bit off_t to 32 bit size_tShawn O. Pearce Wed, 7 Mar 2007 01:44:37 +0000 (20:44 -0500)

Cast 64 bit off_t to 32 bit size_t

Some systems have sizeof(off_t) == 8 while sizeof(size_t) == 4.
This implies that we are able to access and work on files whose
maximum length is around 2^63-1 bytes, but we can only malloc or
mmap somewhat less than 2^32-1 bytes of memory.

On such a system an implicit conversion of off_t to size_t can cause
the size_t to wrap, resulting in unexpected and exciting behavior.
Right now we are working around all gcc warnings generated by the
-Wshorten-64-to-32 option by passing the off_t through xsize_t().

In the future we should make xsize_t on such problematic platforms
detect the wrapping and die if such a file is accessed.

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

Use off_t in pack-objects/fast-import when we mean... Shawn O. Pearce Wed, 7 Mar 2007 01:44:34 +0000 (20:44 -0500)

Use off_t in pack-objects/fast-import when we mean an offset

Always use an off_t value in pack-objects anytime we are dealing
with an offset to some data within a packfile.

Also fixed a minor uintmax_t that was incorrectly defined before.

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

Use off_t when we really mean a file offset.Shawn O. Pearce Wed, 7 Mar 2007 01:44:30 +0000 (20:44 -0500)

Use off_t when we really mean a file offset.

Not all platforms have declared 'unsigned long' to be a 64 bit value,
but we want to support a 64 bit packfile (or close enough anyway)
in the near future as some projects are getting large enough that
their packed size exceeds 4 GiB.

By using off_t, the POSIX type that is declared to mean an offset
within a file, we support whatever maximum file size the underlying
operating system will handle. For most modern systems this is up
around 2^60 or higher.

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

Use uint32_t for pack-objects counters.Shawn O. Pearce Wed, 7 Mar 2007 01:44:24 +0000 (20:44 -0500)

Use uint32_t for pack-objects counters.

As we technically try to support up to a maximum of 2**32-1 objects
in a single packfile we should act like it and use unsigned 32 bit
integers for all of our object counts and progress output.

This change does not modify everything in pack-objects that probably
needs to change to fully support the maximum of 2**32-1 objects.
I'm intentionally breaking the improvements into slightly smaller
commits to make them easier to follow.

No logic change should be occuring here, with the exception that
some comparsions will now work properly when the number of objects
exceeds 2**31-1.

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

Use uint32_t for all packed object counts.Shawn O. Pearce Wed, 7 Mar 2007 01:44:19 +0000 (20:44 -0500)

Use uint32_t for all packed object counts.

As we permit up to 2^32-1 objects in a single packfile we cannot
use a signed int to represent the object offset within a packfile,
after 2^31-1 objects we will start seeing negative indexes and
error out or compute bad addresses within the mmap'd index.

This is a minor cleanup that does not introduce any significant
logic changes. It is roach free.

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

General const correctness fixesShawn O. Pearce Wed, 7 Mar 2007 01:44:17 +0000 (20:44 -0500)

General const correctness fixes

We shouldn't attempt to assign constant strings into char*, as the
string is not writable at runtime. Likewise we should always be
treating unsigned values as unsigned values, not as signed values.

Most of these are very straightforward. The only exception is the
(unnecessary) xstrdup/free in builtin-branch.c for the detached
head case. Since this is a user-level interactive type program
and that particular code path is executed no more than once, I feel
that the extra xstrdup call is well worth the easy elimination of
this warning.

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

Don't build external_grep if its not usedShawn O. Pearce Wed, 7 Mar 2007 01:44:14 +0000 (20:44 -0500)

Don't build external_grep if its not used

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

Fix mmap leak caused by reading bad indexes.Shawn O. Pearce Wed, 7 Mar 2007 01:44:11 +0000 (20:44 -0500)

Fix mmap leak caused by reading bad indexes.

If an index is corrupt, or is simply too new for us to understand,
we were leaking the mmap that held the entire content of the index.
This could be a considerable size on large projects, given that
the index is at least 24 bytes * nr_objects.

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

Display the null SHA-1 as the base for an OBJ_OFS_DELTA.Shawn O. Pearce Wed, 7 Mar 2007 01:44:08 +0000 (20:44 -0500)

Display the null SHA-1 as the base for an OBJ_OFS_DELTA.

Because we are currently cheating and never supplying the delta base
for an OBJ_OFS_DELTA we get a random SHA-1 in the delta base field.
Instead lets clear the hash out so its at least all 0's. This is
somewhat more obvious that something fishy is going on, like we
don't actually have the SHA-1 of the base handy. :)

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

git-archimport: allow remapping branch namesPaolo Bonzini Wed, 7 Mar 2007 09:43:41 +0000 (10:43 +0100)

git-archimport: allow remapping branch names

This patch adds support to archimport for remapping the branch
names to match those used in git more closely. This is useful
for projects that migrate to git (as opposed to users that want
to use git on Arch-based projects). For example, one can choose
an Arch branch name and call it "master".

The new command-line syntax works even if there is a colon in
a branch name, since only the part after the last colon is taken
to be the git name (git does not allow colons in branch names).

The new feature is implemented so that archives rotated every
year can also be remapped into a single git archive.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

t/t5515-fetch-merge-logic.sh: Add two more testsSanti B\e,Ai\e(Bjar Wed, 7 Mar 2007 12:18:59 +0000 (13:18 +0100)

t/t5515-fetch-merge-logic.sh: Add two more tests

They test the behaviour with just a URL in the command line.

Signed-off-by: Santi B\e,Ai\e(Bjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Catch write_ref_sha1 failure in receive-packShawn O. Pearce Wed, 7 Mar 2007 17:04:24 +0000 (12:04 -0500)

Catch write_ref_sha1 failure in receive-pack

This failure to catch the failure of write_ref_sha1 was noticed
by Bill Lear. The ref will not update if the log file could not
be appended to (due to file permissions problems). Such a failure
should be flagged as a failure to update the ref, so that the client
knows the push did not succeed.

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

gitweb: Don't escape attributes in CGI.pm HTML methodsJakub Narebski Wed, 7 Mar 2007 01:21:25 +0000 (02:21 +0100)

gitweb: Don't escape attributes in CGI.pm HTML methods

There is no need to escape HTML tag's attributes in CGI.pm
HTML methods (like CGI::a()), because CGI.pm does attribute
escaping automatically.

$cgi->a({ ... -attribute => atribute_value }, tag_contents)

is translated to

<a ... attribute="attribute_value">tag_contents</a>

The rules for escaping attribute values (which are string contents) are
different. For example you have to take care about escaping embedded '"'
and "'" characters; CGI::a() does that for us automatically.

CGI::a() does not HTML escape tag_contents; we would need to write

<a href="URL">some <b>bold</b> text</a>

for example. So we use esc_html (or esc_path) to escape tag_contents
as needed.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

make t8001 work on Mac OS X againJohannes Schindelin Wed, 7 Mar 2007 00:48:59 +0000 (19:48 -0500)

make t8001 work on Mac OS X again

The test was recently broken to expect sed to leave the
incomplete line at the end without newline.

POSIX says that output of the pattern space is to be followed by
a newline, while GNU adds the newline back only when it was
stripped when input. GNU behaviour is arguably more intuitive
and nicer, but we should not depend on it.

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

gitweb: Change to use explicitly function call cgi... Li Yang Tue, 6 Mar 2007 03:58:56 +0000 (11:58 +0800)

gitweb: Change to use explicitly function call cgi->escapHTML()

Change to use explicitly function call cgi->escapHTML().
This fix the problem on some systems that escapeHTML() is not
functioning, as default CGI is not setting 'escape' parameter.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'maint'Junio C Hamano Tue, 6 Mar 2007 08:45:34 +0000 (00:45 -0800)

Merge branch 'maint'

* maint:
git-gui: Make 'make' quieter by default
git-gui: Remove unnecessary /dev/null redirection.
git-gui: Don't create empty (same tree as parent) commits.
git-gui: Add Reset to the Branch menu.
git-gui: Relocate the menu/transport menu code.

Merge branch 'master' of git://repo.or.cz/git-gui into... Junio C Hamano Tue, 6 Mar 2007 08:39:52 +0000 (00:39 -0800)

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

* 'master' of git://repo.or.cz/git-gui:
git-gui: Make 'make' quieter by default
git-gui: Remove unnecessary /dev/null redirection.
git-gui: Don't create empty (same tree as parent) commits.
git-gui: Add Reset to the Branch menu.
git-gui: Relocate the menu/transport menu code.

git-bundle: fix pack generation.Junio C Hamano Tue, 6 Mar 2007 06:48:00 +0000 (22:48 -0800)

git-bundle: fix pack generation.

The handcrafted built-in rev-list lookalike forgot to mark the trees
and blobs contained in the boundary commits uninteresting, resulting
in unnecessary objects in the pack.

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

git-gui: Make 'make' quieter by default gitgui-0.6.3Shawn O. Pearce Tue, 6 Mar 2007 07:13:23 +0000 (02:13 -0500)

git-gui: Make 'make' quieter by default

To fit nicely into the output of the git.git project's own quieter
Makefile, we want to make the git-gui Makefile nice and quiet too.

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

Merge branch 'maint'Junio C Hamano Tue, 6 Mar 2007 07:11:54 +0000 (23:11 -0800)

Merge branch 'maint'

* maint:
git-commit: cd to top before showing the final stat

git-commit: cd to top before showing the final statJunio C Hamano Mon, 5 Mar 2007 20:35:41 +0000 (12:35 -0800)

git-commit: cd to top before showing the final stat

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

Merge branch 'master-for-junio' of git://repo.or.cz... Junio C Hamano Tue, 6 Mar 2007 05:23:46 +0000 (21:23 -0800)

Merge branch 'master-for-junio' of git://repo.or.cz/git/fastimport; branch 'maint'

* 'master-for-junio' of git://repo.or.cz/git/fastimport:
fast-import: Fail if a non-existant commit is used for merge
fast-import: Avoid infinite loop after reset

* maint:
Fix diff-options references in git-diff and git-format-patch
Add definition of <commit-ish> to the main git man page.
Begin SubmittingPatches with a check list
fast-import: Fail if a non-existant commit is used for merge
fast-import: Avoid infinite loop after reset

Fix diff-options references in git-diff and git-format... Brian Gernhardt Tue, 6 Mar 2007 03:27:44 +0000 (22:27 -0500)

Fix diff-options references in git-diff and git-format-patch

Most of the git-diff-* documentation used [<common diff options>]
instead of [--diff-options], so make that change in git-diff and
git-format-patch.

In addition, git-format-patch didn't include the meanings of the diff
options.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Add definition of <commit-ish> to the main git man... Theodore Ts'o Mon, 5 Mar 2007 19:46:05 +0000 (14:46 -0500)

Add definition of <commit-ish> to the main git man page.

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

Merge branch 'maint-for-junio' of git://repo.or.cz... Junio C Hamano Tue, 6 Mar 2007 01:07:17 +0000 (17:07 -0800)

Merge branch 'maint-for-junio' of git://repo.or.cz/git/fastimport into maint

* 'maint-for-junio' of git://repo.or.cz/git/fastimport:
fast-import: Fail if a non-existant commit is used for merge
fast-import: Avoid infinite loop after reset

Begin SubmittingPatches with a check listJohannes Schindelin Mon, 5 Mar 2007 15:37:54 +0000 (16:37 +0100)

Begin SubmittingPatches with a check list

It seems that some people prefer a short list to a long text. But even for
the latter group, a quick reminder list is useful. So, add a check list to
Documentation/SubmittingPatches of what to do to get your patch accepted.

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

Merge branch 'maint'Shawn O. Pearce Mon, 5 Mar 2007 17:49:02 +0000 (12:49 -0500)

Merge branch 'maint'

* maint:
fast-import: Fail if a non-existant commit is used for merge
fast-import: Avoid infinite loop after reset

[sp: Minor evil merge to deal with type_names array moving
to be private in 'master'.]

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>

contrib/emacs: Use non-interactive function to byte... Xavier Maillard Mon, 5 Mar 2007 08:23:42 +0000 (09:23 +0100)

contrib/emacs: Use non-interactive function to byte-compile files

Add git-blame as a candidate to the byte-compilation.

batch-byte-compile is the prefered way to byte-compile files in
batch mode. Use it instead of the interactive function.

Signed-off-by: Xavier Maillard <zedek@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

t/t5515-fetch-merge-logic.sh: Added tests for the merge... Santi Béjar Mon, 5 Mar 2007 08:09:39 +0000 (09:09 +0100)

t/t5515-fetch-merge-logic.sh: Added tests for the merge login in git-fetch

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

Post 1.5.0.3 cleanupJunio C Hamano Mon, 5 Mar 2007 06:49:10 +0000 (22:49 -0800)

Post 1.5.0.3 cleanup

Update the main git.html page to point at 1.5.0.3 documentation.
Update draft 1.5.1 release notes with what we have so far.

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

Merge branch 'js/fetch-progress' (early part)Junio C Hamano Mon, 5 Mar 2007 01:31:21 +0000 (17:31 -0800)

Merge branch 'js/fetch-progress' (early part)

* 'js/fetch-progress' (early part):
Fixup no-progress for fetch & clone
fetch & clone: do not output progress when not on a tty

Conflicts:

git-fetch.sh

Merge branch 'js/symlink'Junio C Hamano Mon, 5 Mar 2007 01:31:09 +0000 (17:31 -0800)

Merge branch 'js/symlink'

* js/symlink:
Tell multi-parent diff about core.symlinks.
Handle core.symlinks=false case in merge-recursive.
Add core.symlinks to mark filesystems that do not support symbolic links.

Merge branch 'maint'Junio C Hamano Mon, 5 Mar 2007 01:24:49 +0000 (17:24 -0800)

Merge branch 'maint'

* maint:
GIT 1.5.0.3
glossary: Add definitions for dangling and unreachable objects
user-manual: more detailed merge discussion
user-manual: how to replace commits older than most recent
user-manual: insert earlier of mention content-addressable architecture
user-manual: ensure generated manual references stylesheet
user-manual: reset to ORIG_HEAD not HEAD to undo merge
Documentation: mention module option to git-cvsimport

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>

git-svn: fix show-ignore when not connected to the... Eric Wong Sun, 4 Mar 2007 08:15:29 +0000 (00:15 -0800)

git-svn: fix show-ignore when not connected to the repository root

It was traversing the entire repository before.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

diff-ni: allow running from a subdirectory.Junio C Hamano Sun, 4 Mar 2007 07:45:14 +0000 (23:45 -0800)

diff-ni: allow running from a subdirectory.

When run from a subdirectory of a repository, the command forgot
to adjust paths given to it with prefix.

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

Merge branch 'js/diff-ni' (early part)Junio C Hamano Sun, 4 Mar 2007 06:51:46 +0000 (22:51 -0800)

Merge branch 'js/diff-ni' (early part)

* 'js/diff-ni' (early part):
diff: make more cases implicit --no-index

Merge branch 'maint'Junio C Hamano Sun, 4 Mar 2007 03:47:46 +0000 (19:47 -0800)

Merge branch 'maint'

* maint:
Unset NO_C99_FORMAT on Cygwin.
Fix a "pointer type missmatch" warning.
Fix some "comparison is always true/false" warnings.
Fix an "implicit function definition" warning.
Fix a "label defined but unreferenced" warning.
Document the config variable format.suffix
git-merge: fail correctly when we cannot fast forward.
builtin-archive: use RUN_SETUP
Fix git-gc usage note

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>

Tell multi-parent diff about core.symlinks.Johannes Sixt Sat, 3 Mar 2007 19:38:00 +0000 (20:38 +0100)

Tell multi-parent diff about core.symlinks.

When core.symlinks is false, and a merge of symbolic links had conflicts,
the merge result is left as a file in the working directory. A decision
must be made whether the file is treated as a regular file or as a
symbolic link. This patch treats the file as a symbolic link only if
all merge parents were also symbolic links.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Handle core.symlinks=false case in merge-recursive.Johannes Sixt Sat, 3 Mar 2007 19:32:46 +0000 (20:32 +0100)

Handle core.symlinks=false case in merge-recursive.

If the file system does not support symbolic links (core.symlinks=false),
merge-recursive must write the merged symbolic link text into a regular
file.

While we are here, fix a tiny memory leak in the if-branch that writes
real symbolic links.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
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>

Add core.symlinks to mark filesystems that do not suppo... Johannes Sixt Fri, 2 Mar 2007 21:11:30 +0000 (22:11 +0100)

Add core.symlinks to mark filesystems that do not support symbolic links.

Some file systems that can host git repositories and their working copies
do not support symbolic links. But then if the repository contains a symbolic
link, it is impossible to check out the working copy.

This patch enables partial support of symbolic links so that it is possible
to check out a working copy on such a file system. A new flag
core.symlinks (which is true by default) can be set to false to indicate
that the filesystem does not support symbolic links. In this case, symbolic
links that exist in the trees are checked out as small plain files, and
checking in modifications of these files preserve the symlink property in
the database (as long as an entry exists in the index).

Of course, this does not magically make symbolic links work on such defective
file systems; hence, this solution does not help if the working copy relies
on that an entry is a real symbolic link.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'maint'Junio C Hamano Sat, 3 Mar 2007 00:57:53 +0000 (16:57 -0800)

Merge branch 'maint'

* maint:
Fix quoting in update hook template

git-branch: document new --no-abbrev optionJulian Phillips Sat, 3 Mar 2007 00:31:17 +0000 (00:31 +0000)

git-branch: document new --no-abbrev option

Add the new --no-abbrev option to the man page for the git-branch command.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-branch: improve abbreviation of sha1s in verbose... Julian Phillips Sat, 3 Mar 2007 00:31:16 +0000 (00:31 +0000)

git-branch: improve abbreviation of sha1s in verbose mode

git-branch has an --abbrev= command line option, but it does
no checking of the input. Take the argument parsing code from
setup_revisions in revisions.c, and also the code for parsing
the --no-abbrev option.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

print_wrapped_text: fix output for negative indentJohannes Schindelin Fri, 2 Mar 2007 14:28:00 +0000 (15:28 +0100)

print_wrapped_text: fix output for negative indent

When providing a negative indent, it means that -indent columns were
already printed. Fix a bug where the function ate the first character
if already the first word did not fit into the first line.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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>

Sample update hook: typofix and modernization to use... Andy Parkins Fri, 2 Mar 2007 19:29:20 +0000 (19:29 +0000)

Sample update hook: typofix and modernization to use "git log"

Instead of using antiquated "git-rev-parse | git-rev-list"
pipeline, it is easier to use "git-rev-list" or "git-log" these
days, as Linus points out.

While we are at it, fix the typo on variable name $newref that
should be $newrev.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'js/commit-format'Junio C Hamano Fri, 2 Mar 2007 08:37:12 +0000 (00:37 -0800)

Merge branch 'js/commit-format'

* js/commit-format:
show_date(): rename the "relative" parameter to "mode"
Actually make print_wrapped_text() useful
pretty-formats: add 'format:<string>'

Merge branch 'maint'Junio C Hamano Fri, 2 Mar 2007 08:31:51 +0000 (00:31 -0800)

Merge branch 'maint'

* maint:
Another memory overrun in http-push.c
fetch.o depends on the headers, too.
Documentation: Correct minor typo in git-add documentation.
Documentation/git-send-email.txt: Fix labeled list formatting
Documentation/git-quiltimport.txt: Fix labeled list formatting
Documentation/build-docdep.perl: Fix dependencies for included asciidoc files

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-svn.txt: Fix formatting errorsSergey Vlasov Thu, 1 Mar 2007 19:41:17 +0000 (22:41 +0300)

Documentation/git-svn.txt: Fix formatting errors

Fix some formatting problems:

- Some list labels were missing their "::" characters.
- Some of continuation paragraphs in labeled lists were incorrectly
formatted as literal paragraphs.
- In one case "[verse]" was missing before the config key list.
- The "Basic Examples" section was incorrectly nested inside the
"Config File-Only Options" section.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Eric Wong <normalperson@yhbt.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>

git-gui: Remove unnecessary /dev/null redirection.Shawn O. Pearce Thu, 1 Mar 2007 19:37:34 +0000 (14:37 -0500)

git-gui: Remove unnecessary /dev/null redirection.

Git 1.5.0 and later no longer output useless messages to standard
error when making the initial (or what looks to be) commit of a
repository. Since /dev/null does not exist on Windows in the
MinGW environment we can't redirect there anyway. Since Git
does not output anymore, I'm removing the redirection.

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

fix various doc typosMichael Coleman Thu, 1 Mar 2007 05:14:23 +0000 (23:14 -0600)

fix various doc typos

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

diff: make more cases implicit --no-indexJohannes Schindelin Sun, 25 Feb 2007 22:35:27 +0000 (23:35 +0100)

diff: make more cases implicit --no-index

When specifying an absolute path, or a relative path pointing outside
the working tree, do not fail, but roll your own diffopt parsing,
and execute a --no-index diff.

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

Add recent changes to draft 1.5.1 release notes.Junio C Hamano Wed, 28 Feb 2007 23:06:38 +0000 (15:06 -0800)

Add recent changes to draft 1.5.1 release notes.

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

Merge branch 'js/commit-by-name'Junio C Hamano Wed, 28 Feb 2007 22:56:08 +0000 (14:56 -0800)

Merge branch 'js/commit-by-name'

* js/commit-by-name:
object name: introduce ':/<oneline prefix>' notation

Merge branch 'js/bundle'Junio C Hamano Wed, 28 Feb 2007 22:38:36 +0000 (14:38 -0800)

Merge branch 'js/bundle'

* js/bundle:
bundle: reword missing prerequisite error message
git-bundle: record commit summary in the prerequisite data
git-bundle: fix 'create --all'
git-bundle: avoid fork() in verify_bundle()
git-bundle: assorted fixes
Add git-bundle: move objects and references by archive

Merge branch 'maint'Junio C Hamano Wed, 28 Feb 2007 22:18:57 +0000 (14:18 -0800)

Merge branch 'maint'

* maint:
Start preparing Release Notes for 1.5.0.3
Documentation: git-remote add [-t <branch>] [-m <branch>] [-f] name url
Include config.mak in doc/Makefile
git.el: Set the default commit coding system from the repository config.
git-archimport: support empty summaries, put summary on a single line.
http-push.c::lock_remote(): validate all remote refs.
git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.

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>

index_fd(): convert blob only if it is a regular file.Junio C Hamano Wed, 28 Feb 2007 19:57:39 +0000 (11:57 -0800)

index_fd(): convert blob only if it is a regular file.

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

index_fd(): pass optional path parameter as hint for... Junio C Hamano Wed, 28 Feb 2007 19:52:04 +0000 (11:52 -0800)

index_fd(): pass optional path parameter as hint for blob conversion

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

index_fd(): use enum object_type instead of type name... Junio C Hamano Wed, 28 Feb 2007 19:45:56 +0000 (11:45 -0800)

index_fd(): use enum object_type instead of type name string.

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

Merge branch 'np/types'Junio C Hamano Wed, 28 Feb 2007 19:58:27 +0000 (11:58 -0800)

Merge branch 'np/types'

* np/types:
Cleanup check_valid in commit-tree.
make sure enum object_type is signed
get rid of lookup_object_type()
convert object type handling from a string to a number
formalize typename(), and add its reverse type_from_string()
sha1_file.c: don't ignore an error condition in sha1_loose_object_info()
sha1_file.c: cleanup "offset" usage
sha1_file.c: cleanup hdr usage

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>

Merge branch 'mc/sendmail'Junio C Hamano Wed, 28 Feb 2007 06:23:40 +0000 (22:23 -0800)

Merge branch 'mc/sendmail'

* mc/sendmail:
git-send-email: abort/usage on bad option

Merge branch 'js/diff-ni' (early part)Junio C Hamano Wed, 28 Feb 2007 06:18:22 +0000 (22:18 -0800)

Merge branch 'js/diff-ni' (early part)

* 'js/diff-ni' (early part):
diff --no-index: also imitate the exit status of diff(1)
Fix typo: do not show name1 when name2 fails
Teach git-diff-files the new option `--no-index`
run_diff_{files,index}(): update calling convention.
update-index: do not die too early in a read-only repository.
git-status: do not be totally useless in a read-only repository.

Merge branch 'maint'Junio C Hamano Wed, 28 Feb 2007 06:15:42 +0000 (22:15 -0800)

Merge branch 'maint'

* maint:
builtin-fmt-merge-msg: fix bugs in --file option
index-pack: Loop over pread until data loading is complete.
blameview: Fix the browse behavior in blameview
Fix minor typos/grammar in user-manual.txt
Correct ordering in git-cvsimport's option documentation
git-show: Reject native ref
Fix git-show man page formatting in the EXAMPLES section

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>