gitweb.git
Merge git://repo.or.cz/git-guiJunio C Hamano Sun, 17 Feb 2008 01:42:49 +0000 (17:42 -0800)

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

* git://repo.or.cz/git-gui:
git-gui: Correct size of dictionary name widget in options dialog
git-gui: Paper bag fix bad string length call in spellchecker

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Sun, 17 Feb 2008 01:41:38 +0000 (17:41 -0800)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
[PATCH] gitk: Heed the lines of context in merge commits

Merge branch 'maint'Junio C Hamano Sun, 17 Feb 2008 01:41:23 +0000 (17:41 -0800)

Merge branch 'maint'

* maint:
Documentation/git-reset: Add an example of resetting selected paths
Documentation/git-reset: don't mention --mixed for selected-paths reset
Documentation/git-reset:

Documentation/SubmittingPatches - a suggested patch... Junio C Hamano Sun, 10 Feb 2008 22:09:52 +0000 (14:09 -0800)

Documentation/SubmittingPatches - a suggested patch flow

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

checkout: notice when the switched branch is behind... Junio C Hamano Sun, 17 Feb 2008 01:17:09 +0000 (17:17 -0800)

checkout: notice when the switched branch is behind or forked

When you are switching to a branch that is marked to merge from
somewhere else, e.g. when you have:

[branch "next"]
remote = upstream
merge = refs/heads/next
[remote "upstream"]
url = ...
fetch = refs/heads/*:refs/remotes/linus/*

and you say "git checkout next", the branch you checked out
may be behind, and you may want to update from the upstream
before continuing to work.

This patch makes the command to check the upstream (in this
example, "refs/remotes/linus/next") and our branch "next", and:

(1) if they match, nothing happens;

(2) if you are ahead (i.e. the upstream is a strict ancestor
of you), one line message tells you so;

(3) otherwise, you are either behind or you and the upstream
have forked. One line message will tell you which and
then you will see a "log --pretty=oneline --left-right".

We could enhance this with an option that tells the command to
check if there is no local change, and automatically fast
forward when you are truly behind. But I ripped out that change
because I was unsure what the right way should be to allow users
to control it (issues include that checkout should not become
automatically interactive).

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

Build in checkoutDaniel Barkalow Thu, 7 Feb 2008 16:40:23 +0000 (11:40 -0500)

Build in checkout

The only differences in behavior should be:

- git checkout -m with non-trivial merging won't print out
merge-recursive messages (see the change in t7201-co.sh)

- git checkout -- paths... will give a sensible error message if
HEAD is invalid as a commit.

- some intermediate states which were written to disk in the shell
version (in particular, index states) are only kept in memory in
this version, and therefore these can no longer be revealed by
later write operations becoming impossible.

- when we change branches, we discard MERGE_MSG, SQUASH_MSG, and
rr-cache/MERGE_RR, like reset always has.

I'm not 100% sure I got the merge recursive setup exactly right; the
base for a non-trivial merge in the shell code doesn't seem
theoretically justified to me, but I tried to match it anyway, and the
tests all pass this way.

Other than these items, the results should be identical to the shell
version, so far as I can tell.

[jc: squashed lock-file fix from Dscho in]

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

Documentation/git-reset: Add an example of resetting... Pieter de Bie Sat, 16 Feb 2008 16:48:46 +0000 (17:48 +0100)

Documentation/git-reset: Add an example of resetting selected paths

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-reset: don't mention --mixed for... Pieter de Bie Sat, 16 Feb 2008 16:48:45 +0000 (17:48 +0100)

Documentation/git-reset: don't mention --mixed for selected-paths reset

The option is accepted, but that is the only form selected-paths
variant of the reset command takes, so there is no point mentioning it.
And while we're at it, use the dashless git call.

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-reset:Junio C Hamano Sat, 16 Feb 2008 18:38:12 +0000 (10:38 -0800)

Documentation/git-reset:

Since 3368d11 (Remove unnecessary git-rm --cached reference from
status output), the status output marks the "Added but not yet
committed" section as "Changes to be committed".

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

add--interactive: handle initial commit betterJeff King Wed, 13 Feb 2008 10:50:51 +0000 (05:50 -0500)

add--interactive: handle initial commit better

There were several points where we looked at the HEAD
commit; for initial commits, this is meaningless. So instead
we:

- show staged status data as a diff against the empty tree
instead of HEAD
- show file diffs as creation events
- use "git rm --cached" to revert instead of going back to
the HEAD commit

We magically reference the empty tree to implement this.

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

Update fast-import documentation to discuss crash reportsShawn O. Pearce Thu, 14 Feb 2008 06:34:46 +0000 (01:34 -0500)

Update fast-import documentation to discuss crash reports

Recent versions of fast-import will now dump information out upon
crashing, making it possible for the frontend developer to review
some state information and possibly restart the import from the
point where it crashed.

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

Finish current packfile during fast-import crash handlerShawn O. Pearce Thu, 14 Feb 2008 06:34:43 +0000 (01:34 -0500)

Finish current packfile during fast-import crash handler

If fast-import is in the middle of crashing due to a protocol error
or something like that then it can be very useful to have the mark
table and all objects up until that point be available for a new
import to resume from.

Currently we just close the active packfile, unkeep all of our
newly created packfiles (so they can be deleted), and dump the
marks table to a temporary file.

We don't attempt to update the refs/tags that the process has in
memory as much of that data can be found in the crash report and I'm
not sure it would be the right thing to do under every type of crash.

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

Include the fast-import marks table in crash reportsShawn O. Pearce Thu, 14 Feb 2008 06:34:40 +0000 (01:34 -0500)

Include the fast-import marks table in crash reports

If fast-import was not run with --export-marks but we are crashing
the frontend application developer may still benefit from having
that information available to them. We now include the marks table
as part of the crash report if --export-marks was not supplied on
the command line.

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

Include annotated tags in fast-import crash reportsShawn O. Pearce Thu, 14 Feb 2008 06:34:36 +0000 (01:34 -0500)

Include annotated tags in fast-import crash reports

If annotated tags were created they exist in a different namespace
within the fast-import process' internal memory tables so we did
not export them in the inactive branch table. Now they are written
out after the branches, in the order that they were defined by the
frontend process.

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

Documentation: add 'git-web--browse.txt' and simplify... Christian Couder Thu, 14 Feb 2008 07:01:23 +0000 (08:01 +0100)

Documentation: add 'git-web--browse.txt' and simplify other docs.

'git-help.txt' and 'git-instaweb.txt' contained duplicated
information about 'git-web--browse'.

This patch puts this information where it belongs.

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

git-help--browse: improve browser support under OS XJay Soffian Thu, 14 Feb 2008 08:36:14 +0000 (03:36 -0500)

git-help--browse: improve browser support under OS X

/usr/bin/open <document> is used under OS X to open a document as if the
user had double-clicked on the file's icon (i.e. HTML files are opened
w/the user's default browser).

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

Merge branch 'maint'Junio C Hamano Sat, 16 Feb 2008 08:20:37 +0000 (00:20 -0800)

Merge branch 'maint'

* maint:
commit: discard index after setting up partial commit
filter-branch: handle filenames that need quoting
diff: Fix miscounting of --check output
hg-to-git: fix parent analysis
mailinfo: feed only one line to handle_filter() for QP input
diff.c: add "const" qualifier to "char *cmd" member of "struct ll_diff_driver"
Add "const" qualifier to "char *excludes_file".
Add "const" qualifier to "char *editor_program".
Add "const" qualifier to "char *pager_program".
config: add 'git_config_string' to refactor string config variables.
diff.c: remove useless check for value != NULL
fast-import: check return value from unpack_entry()
Validate nicknames of remote branches to prohibit confusing ones
diff.c: replace a 'strdup' with 'xstrdup'.
diff.c: fixup garding of config parser from value=NULL

commit: discard index after setting up partial commitJeff King Thu, 14 Feb 2008 17:18:23 +0000 (12:18 -0500)

commit: discard index after setting up partial commit

There may still be some entries from the original index that
should be discarded before we show the status. In
particular, if a file was added in the index but not
included in the partial commit, it would still show up in
the status listing as staged for commit.

Ultimately the correct fix is to keep the two states in
separate index_state variables. Then we can avoid having
to reload the cache from the temporary file altogether, and
just point wt_status_print at the correct index.

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

filter-branch: handle filenames that need quotingJunio C Hamano Sat, 16 Feb 2008 07:57:26 +0000 (23:57 -0800)

filter-branch: handle filenames that need quoting

The command used a very old fashioned construct to extract
filenames out of diff-index and ended up corrupting the output.
We can simply use --name-only and pipe into --stdin mode of
update-index. It's been like that for the past 2 years or so
since a94d994 (update-index: work with c-quoted name).

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

http-push: avoid a needless gotoJohannes Schindelin Thu, 14 Feb 2008 23:26:12 +0000 (23:26 +0000)

http-push: avoid a needless goto

There was a goto, and while it is not half as harmful as some people
believe, it was unnecessary here. So remove it for readability.

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

http-push: do not get confused by submodulesJohannes Schindelin Thu, 14 Feb 2008 23:32:32 +0000 (23:32 +0000)

http-push: do not get confused by submodules

When encountering submodules in a tree, http-push should not try sending
the respective object. Instead, it should ignore it.

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

http-push: avoid invalid memory accessesJohannes Schindelin Thu, 14 Feb 2008 23:25:33 +0000 (23:25 +0000)

http-push: avoid invalid memory accesses

Before objects are sent, the respective ref is locked. However,
without this patch, the lock is lifted before the last object for
that ref was sent. As a consequence, the lock data was accessed
after the lock structure was free()d.

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

diff: Fix miscounting of --check outputJunio C Hamano Sat, 16 Feb 2008 04:30:05 +0000 (20:30 -0800)

diff: Fix miscounting of --check output

c1795bb (Unify whitespace checking) incorrectly made the
checking function return without incrementing the line numbers
when there is no whitespace problem is found on a '+' line.

This resurrects the earlier behaviour.

Noticed and reported by Jay Soffian. The test script was stolen
from Jay's independent fix.

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

hg-to-git: fix parent analysisStelian Pop Fri, 15 Feb 2008 21:20:44 +0000 (22:20 +0100)

hg-to-git: fix parent analysis

Fix a bug in the hg-to-git convertor introduced by commit
1bc7c13af9f936aa80893100120b542338a10bf4: when searching the changeset
parents, 'hg log' returns an extra space at the end of the line, which
confuses the .split(' ') based tokenizer:

Traceback (most recent call last):
File "hg-to-git.py", line 123, in <module>
hgchildren[mparent] += ( str(cset), )
KeyError: ''

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mailinfo: feed only one line to handle_filter() for... Jay Soffian Fri, 15 Feb 2008 21:53:36 +0000 (16:53 -0500)

mailinfo: feed only one line to handle_filter() for QP input

The function is intended to be fed one logical line at a time to
inspect, but a QP encoded raw input line can have more than one
lines, just like BASE64 encoded one.

Quoting LF as =0A may be unusual but RFC2045 allows it.

The issue was noticed and fixed by Jay Soffian. JC added a test
to protect the fix from regressing later.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff.c: add "const" qualifier to "char *cmd" member... Christian Couder Sat, 16 Feb 2008 05:02:17 +0000 (06:02 +0100)

diff.c: add "const" qualifier to "char *cmd" member of "struct ll_diff_driver"

Also use "git_config_string" to simplify code where "cmd" is set.

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

Add "const" qualifier to "char *excludes_file".Christian Couder Sat, 16 Feb 2008 05:01:59 +0000 (06:01 +0100)

Add "const" qualifier to "char *excludes_file".

Also use "git_config_string" to simplify "config.c" code
where "excludes_file" is set.

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

Add "const" qualifier to "char *editor_program".Christian Couder Sat, 16 Feb 2008 05:01:41 +0000 (06:01 +0100)

Add "const" qualifier to "char *editor_program".

Also use "git_config_string" to simplify "config.c" code
where "editor_program" is set.

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

Add "const" qualifier to "char *pager_program".Christian Couder Sat, 16 Feb 2008 05:01:11 +0000 (06:01 +0100)

Add "const" qualifier to "char *pager_program".

Also use "git_config_string" to simplify "config.c" code
where "pager_program" is set.

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

config: add 'git_config_string' to refactor string... Christian Couder Sat, 16 Feb 2008 05:00:24 +0000 (06:00 +0100)

config: add 'git_config_string' to refactor string config variables.

In many places we just check if a value from the config file is not
NULL, then we duplicate it and return 0. This patch introduces the new
'git_config_string' function to do that.

This function is also used to refactor some code in 'config.c'.
Refactoring other files is left for other patches.

Also not all the code in "config.c" is refactored, because the function
takes a "const char **" as its first parameter, but in many places a
"char *" is used instead of a "const char *". (And C does not allow
using a "char **" instead of a "const char **" without a warning.)

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

diff.c: remove useless check for value != NULLChristian Couder Sat, 16 Feb 2008 04:59:53 +0000 (05:59 +0100)

diff.c: remove useless check for value != NULL

It is not necessary to check if value != NULL before calling
'parse_lldiff_command' as there is already a check inside this
function.

By the way this patch also improves the existing check inside
'parse_lldiff_command' by using:
return config_error_nonbool(var);
instead of:
return error("%s: lacks value", var);

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

fast-import: check return value from unpack_entry()Shawn O. Pearce Thu, 14 Feb 2008 06:34:34 +0000 (01:34 -0500)

fast-import: check return value from unpack_entry()

If the tree object we have asked for is deltafied in the packfile and
the delta did not apply correctly or was not able to be decompressed
from the packfile then we can get back NULL instead of the tree data.
This is (part of) the reason why read_sha1_file() can return NULL, so
we need to also handle it the same way.

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

Validate nicknames of remote branches to prohibit confu... Daniel Barkalow Fri, 15 Feb 2008 19:14:18 +0000 (14:14 -0500)

Validate nicknames of remote branches to prohibit confusing ones

The original problem was that the parsers for configuration files were
getting confused by seeing as nicknames remotes that involved
directory-changing characters. In particular, the branches config file
for ".." was particularly mystifying on platforms that can open
directories and read odd data from them.

The validation function was written by Junio Hamano (with a typo
corrected).

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

diff.c: replace a 'strdup' with 'xstrdup'.Christian Couder Thu, 14 Feb 2008 05:50:00 +0000 (06:50 +0100)

diff.c: replace a 'strdup' with 'xstrdup'.

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

diff.c: fixup garding of config parser from value=NULLJunio C Hamano Fri, 15 Feb 2008 17:37:54 +0000 (09:37 -0800)

diff.c: fixup garding of config parser from value=NULL

Christian Couder noticed that there still were a handcrafted error()
call that we should have converted to config_error_nonbool() where
parse_lldiff_command() parses the configuration file.

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

git-gui: Correct size of dictionary name widget in... Shawn O. Pearce Thu, 14 Feb 2008 06:07:39 +0000 (01:07 -0500)

git-gui: Correct size of dictionary name widget in options dialog

We don't need to fill this entire horizontal cavity, it looks really
bad on some platforms to stretch the widget out to fill the window.

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

git-gui: Paper bag fix bad string length call in spellc... Shawn O. Pearce Thu, 14 Feb 2008 06:05:04 +0000 (01:05 -0500)

git-gui: Paper bag fix bad string length call in spellchecker

We don't want the list length, we need the string length.

Found due to a bad " character discovered in the text and
Tcl throwing 'unmatched open quote in list'.

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

Add "--show-all" revision walker flag for debuggingLinus Torvalds Sat, 9 Feb 2008 22:02:07 +0000 (14:02 -0800)

Add "--show-all" revision walker flag for debugging

It's really not very easy to visualize the commit walker, because - on
purpose - it obvously doesn't show the uninteresting commits!

This adds a "--show-all" flag to the revision walker, which will make
it show uninteresting commits too, and they'll have a '^' in front of
them (it also fixes a logic error for !verbose_header for boundary
commits - we should show the '-' even if left_right isn't shown).

A separate patch to gitk to teach it the new '^' was sent
to paulus. With the change in place, it actually is interesting
even for the cases that git doesn't have any problems with, ie
for the kernel you can do:

gitk -d --show-all v2.6.24..

and you see just how far down it has to parse things to see it all. The
use of "-d" is a good idea, since the date-ordered toposort is much better
at showing why it goes deep down (ie the date of some of those commits
after 2.6.24 is much older, because they were merged from trees that
weren't rebased).

So I think this is a useful feature even for non-debugging - just to
visualize what git does internally more.

When it actually breaks out due to the "everybody_uninteresting()"
case, it adds the uninteresting commits (both the one it's looking at
now, and the list of pending ones) to the list

This way, we really list *all* the commits we've looked at.

Because we now end up listing commits we may not even have been parsed
at all "show_log" and "show_commit" need to protect against commits
that don't have a commit buffer entry.

That second part is debatable just how it should work. Maybe we shouldn't
show such entries at all (with this patch those entries do get shown, they
just don't get any message shown with them). But I think this is a useful
case.

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

[PATCH] gitk: Heed the lines of context in merge commitsJohannes Sixt Wed, 13 Feb 2008 16:27:30 +0000 (17:27 +0100)

[PATCH] gitk: Heed the lines of context in merge commits

There is an edit box where the number of context lines can be chosen.
But it was only used when regular diffs were displayed, not for
merge commits. This fixes it.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Paul Mackerras <paulus@samba.org>

diff --relative: help working in a bare repositoryJunio C Hamano Wed, 13 Feb 2008 08:34:39 +0000 (00:34 -0800)

diff --relative: help working in a bare repository

This allows the --relative option to say which subdirectory to
pretend to be in, so that in a bare repository, you can say:

$ git log --relative=drivers/ v2.6.20..v2.6.22 -- drivers/scsi/

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

diff --relative: output paths as relative to the curren... Junio C Hamano Tue, 12 Feb 2008 22:26:02 +0000 (14:26 -0800)

diff --relative: output paths as relative to the current subdirectory

This adds --relative option to the diff family. When you start
from a subdirectory:

$ git diff --relative

shows only the diff that is inside your current subdirectory,
and without $prefix part. People who usually live in
subdirectories may like it.

There are a few things I should also mention about the change:

- This works not just with diff but also works with the log
family of commands, but the history pruning is not affected.

In other words, if you go to a subdirectory, you can say:

$ git log --relative -p

but it will show the log message even for commits that do not
touch the current directory. You can limit it by giving
pathspec yourself:

$ git log --relative -p .

This originally was not a conscious design choice, but we
have a way to affect diff pathspec and pruning pathspec
independently. IOW "git log --full-diff -p ." tells it to
prune history to commits that affect the current subdirectory
but show the changes with full context. I think it makes
more sense to leave pruning independent from --relative than
the obvious alternative of always pruning with the current
subdirectory, which would break the symmetry.

- Because this works also with the log family, you could
format-patch a single change, limiting the effect to your
subdirectory, like so:

$ cd gitk-git
$ git format-patch -1 --relative 911f1eb

But because that is a special purpose usage, this option will
never become the default, with or without repository or user
preference configuration. The risk of producing a partial
patch and sending it out by mistake is too great if we did
so.

- This is inherently incompatible with --no-index, which is a
bolted-on hack that does not have much to do with git
itself. I didn't bother checking and erroring out on the
combined use of the options, but probably I should.

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

Merge branch 'maint'Junio C Hamano Wed, 13 Feb 2008 22:33:19 +0000 (14:33 -0800)

Merge branch 'maint'

* maint:
config: add test cases for empty value and no value config variables.
cvsimport: have default merge regex also match beginning of commit message
git clone -s documentation: force a new paragraph for the NOTE
status: suggest "git rm --cached" to unstage for initial commit
Protect get_author_ident_from_commit() from filenames in work tree
upload-pack: Initialize the exec-path.
bisect: use verbatim commit subject in the bisect log
git-cvsimport.txt: fix '-M' description.
Revert "pack-objects: only throw away data during memory pressure"

config: add test cases for empty value and no value... Christian Couder Thu, 7 Feb 2008 05:23:46 +0000 (06:23 +0100)

config: add test cases for empty value and no value config variables.

The tests in 't1300-repo-config.sh' did not check what happens when
an empty value like the following is used in the config file:

[emptyvalue]
variable =

Also it was not checked that a variable with no value like the
following:

[novalue]
variable

gives a boolean "true" value, while an ampty value gives a boolean
"false" value.

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

cvsimport: have default merge regex also match beginnin... Gerrit Pape Thu, 7 Feb 2008 09:36:10 +0000 (09:36 +0000)

cvsimport: have default merge regex also match beginning of commit message

The default value of @mergerx uses \W, which matches a non-word
character; this means that commit messages like "Merging FOO" are not
matched by default; using \b, which matches a word boundary, instead of
\W fixes that.

This change was suggested by Frédéric Brière through
http://bugs.debian.org/463468

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

git clone -s documentation: force a new paragraph for... Miklos Vajna Tue, 12 Feb 2008 00:12:57 +0000 (01:12 +0100)

git clone -s documentation: force a new paragraph for the NOTE

It should be loud and clear.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

status: suggest "git rm --cached" to unstage for initia... Jeff King Tue, 12 Feb 2008 05:45:18 +0000 (00:45 -0500)

status: suggest "git rm --cached" to unstage for initial commit

It makes no sense to suggest "git reset HEAD" since we have
no HEAD commit. This actually used to work but regressed in
f26a0012.

wt_status_print_cached_header was updated to take the whole
wt_status struct rather than just the reference field.
Previously the various code paths were sometimes sending in
s->reference and sometimes sending in NULL, making the
decision on whether this was an initial commit before we
even got to this function. Now we must check the initial
flag here.

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

hard-code the empty tree objectJeff King Wed, 13 Feb 2008 11:25:04 +0000 (06:25 -0500)

hard-code the empty tree object

Now any commands may reference the empty tree object by its
sha1 (4b825dc642cb6eb9a060e54bf8d69288fbee4904). This is
useful for showing some diffs, especially for initial
commits.

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

Protect get_author_ident_from_commit() from filenames... Junio C Hamano Wed, 13 Feb 2008 21:13:21 +0000 (13:13 -0800)

Protect get_author_ident_from_commit() from filenames in work tree

We used to use "cat-file commit $commit" to extract the original
author information from existing commit, but an earlier commit
5ac2715 (Consistent message encoding while reusing log from an
existing commit) changed it to use "git show -s $commit". If
you have a file in your work tree that can be interpreted as a
valid object name (e.g. "HEAD"), this conversion will not work.

Disambiguate by marking the end of revision parameter on the
comand line with an explicit "--" to fix this.

This breakage is most visible with rebase when a file called
"HEAD" exists in the worktree.

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

upload-pack: Initialize the exec-path.Johannes Sixt Tue, 12 Feb 2008 11:28:01 +0000 (12:28 +0100)

upload-pack: Initialize the exec-path.

Since git-upload-pack has to spawn git-pack-objects, it has to make sure
that the latter can be found in the PATH. Without this patch an attempt
to clone or pull via ssh from a server fails if the git tools are not in
the standard PATH on the server even though git clone or git pull were
invoked with --upload-pack=/path/to/git-upload-pack.

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

bisect: use verbatim commit subject in the bisect logJohannes Schindelin Tue, 12 Feb 2008 19:50:57 +0000 (19:50 +0000)

bisect: use verbatim commit subject in the bisect log

Due to a typo, the commit subject was shell expanded in the bisect log.
That is, if you had some shell pattern in the commit subject, bisect
would happily put all matching file names into the log.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cvsimport.txt: fix '-M' description.Sergei Organov Wed, 13 Feb 2008 14:31:17 +0000 (17:31 +0300)

git-cvsimport.txt: fix '-M' description.

Fix '-M' description. Old one reads as if the user can somehow "see"
the default regex when using -M along with -m.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://repo.or.cz/git-guiJunio C Hamano Wed, 13 Feb 2008 19:04:58 +0000 (11:04 -0800)

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

* git://repo.or.cz/git-gui:
git-gui: Automatically spell check commit messages as the user types
git-gui: support Git Gui.app under OS X 10.5
git-gui: Update German translation.
git-gui: (i18n) Fix a bunch of still untranslated strings.

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Wed, 13 Feb 2008 19:03:49 +0000 (11:03 -0800)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
[PATCH] gitk: learn --show-all output
[PATCH] gitk: properly deal with tag names containing / (slash)
[PATCH] gitk: Add checkbutton to ignore space changes
[PATCH] gitk: Fix "Key bindings" message

[PATCH] gitk: learn --show-all outputLinus Torvalds Sat, 9 Feb 2008 22:02:07 +0000 (14:02 -0800)

[PATCH] gitk: learn --show-all output

It's really not very easy to visualize the commit walker,
because - on purpose - it obvously doesn't show the
uninteresting commits!

We will soon add a "--show-all" flag to the revision walker,
which will make it show uninteresting commits too, and they'll
have a '^' in front of them.

This is to update 'gitk' to show those negative commits in gray
to futureproof it.

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

Revert "pack-objects: only throw away data during memor... Junio C Hamano Wed, 13 Feb 2008 07:39:03 +0000 (23:39 -0800)

Revert "pack-objects: only throw away data during memory pressure"

This reverts commit 9c2174350cc0ae0f6bad126e15fe1f9f044117ab.

Nico analyzed and found out that this does not really help, and
I agree with it.

By the time this gets into action and data is actively thrown
away, performance simply goes down the drain due to the data
constantly being reloaded over and over and over and over and
over and over again, to the point of virtually making no
relative progress at all. The previous behavior of enforcing
the memory limit by dynamically shrinking the window size at
least had the effect of allowing some kind of progress, even if
the end result wouldn't be optimal.

And that's the whole point behind this memory limiting feature:
allowing some progress to be made when resources are too limited
to let the repack go unbounded.

Fix 'git cvsexportcommit -w $cvsdir ...' when used... Johan Herland Mon, 11 Feb 2008 23:43:41 +0000 (00:43 +0100)

Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR

When using the '-w $cvsdir' option to cvsexportcommit, it will chdir into
$cvsdir before executing several other git commands. If $GIT_DIR is set to
a relative path (e.g. '.'), the git commands executed by cvsexportcommit
will naturally fail.

Therefore, ensure that $GIT_DIR is absolute before the chdir to $cvsdir.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add testcase for 'git cvsexportcommit -w $cvsdir .... Johan Herland Wed, 13 Feb 2008 03:11:22 +0000 (04:11 +0100)

Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR

The testcase verifies that 'git cvsexportcommit' functions correctly when
the '-w' option is used, and GIT_DIR is set to a relative path (e.g. '.').

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add "--dirstat" for some directory statisticsLinus Torvalds Tue, 12 Feb 2008 21:26:31 +0000 (13:26 -0800)

Add "--dirstat" for some directory statistics

This adds a new form of overview diffstat output, doing something that I
have occasionally ended up doing manually (and badly, because it's
actually pretty nasty to do), and that I think is very useful for an
project like the kernel that has a fairly deep and well-separated
directory structure with semantic meaning.

What I mean by that is that it's often interesting to see exactly which
sub-directories are impacted by a patch, and to what degree - even if you
don't perhaps care so much about the individual files themselves.

What makes the concept more interesting is that the "impact" is often
hierarchical: in the kernel, for example, something could either have a
very localized impact to "fs/ext3/" and then it's interesting to see that
such a patch changes mostly that subdirectory, but you could have another
patch that changes some generic VFS-layer issue which affects _many_
subdirectories that are all under "fs/", but none - or perhaps just a
couple of them - of the individual filesystems are interesting in
themselves.

So what commonly happens is that you may have big changes in a specific
sub-subdirectory, but still also significant separate changes to the
subdirectory leading up to that - maybe you have significant VFS-level
changes, but *also* changes under that VFS layer in the NFS-specific
directories, for example. In that case, you do want the low-level parts
that are significant to show up, but then the insignificant ones should
show up as under the more generic top-level directory.

This patch shows all of that with "--dirstat". The output can be either
something simple like

commit 81772fe...
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Sun Feb 10 23:57:36 2008 +0100

x86: remove over noisy debug printk

pageattr-test.c contains a noisy debug printk that people reported.
The condition under which it prints (randomly tapping into a mem_map[]
hole and not being able to c_p_a() there) is valid behavior and not
interesting to report.

Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
100.0% arch/x86/mm/

or something much more complex like

commit e231c2e...
Author: David Howells <dhowells@redhat.com>
Date: Thu Feb 7 00:15:26 2008 -0800

Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p)

20.5% crypto/
7.6% fs/afs/
7.6% fs/fuse/
7.6% fs/gfs2/
5.1% fs/jffs2/
5.1% fs/nfs/
5.1% fs/nfsd/
7.6% fs/reiserfs/
15.3% fs/
7.6% net/rxrpc/
10.2% security/keys/

where that latter example is an example of significant work in some
individual fs/*/ subdirectories (like the patches to reiserfs accounting
for 7.6% of the whole), but then discounting those individual filesystems,
there's also 15.3% other "random" things that weren't worth reporting on
their oen left over under fs/ in general (either in that directory itself,
or in subdirectories of fs/ that didn't have enough changes to be reported
individually).

I'd like to stress that the "15.3% fs/" mentioned above is the stuff that
is under fs/ but that was _not_ significant enough to report on its own.
So the above does _not_ mean that 15.3% of the work was under fs/ per se,
because that 15.3% does *not* include the already-reported 7.6% of afs,
7.6% of fuse etc.

If you want to enable "cumulative" directory statistics, you can use the
"--cumulative" flag, which adds up percentages recursively even when
they have been already reported for a sub-directory. That cumulative
output is disabled if *all* of the changes in one subdirectory come from
a deeper subdirectory, to avoid repeating subdirectories all the way to
the root.

For an example of the cumulative reporting, the above commit becomes

commit e231c2e...
Author: David Howells <dhowells@redhat.com>
Date: Thu Feb 7 00:15:26 2008 -0800

Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p)

20.5% crypto/
7.6% fs/afs/
7.6% fs/fuse/
7.6% fs/gfs2/
5.1% fs/jffs2/
5.1% fs/nfs/
5.1% fs/nfsd/
7.6% fs/reiserfs/
61.5% fs/
7.6% net/rxrpc/
10.2% security/keys/

in which the commit percentages now obviously add up to much more than
100%: now the changes that were already reported for the sub-directories
under fs/ are then cumulatively included in the whole percentage of fs/
(ie now shows 61.5% as opposed to the 15.3% without the cumulative
reporting).

The default reporting limit has been arbitrarily set at 3%, which seems
to be a pretty good cut-off, but you can specify the cut-off manually by
giving it as an option parameter (eg "--dirstat=5" makes the cut-off be
at 5% instead)

NOTE! The percentages are purely about the total lines added and removed,
not anything smarter (or dumber) than that. Also note that you should not
generally expect things to add up to 100%: not only does it round down, we
don't report leftover scraps (they add up to the top-level change count,
but we don't even bother reporting that, it only reports subdirectories).

Quite frankly, as a top-level manager this is really convenient for me,
but it's going to be very boring for git itself since there are few
subdirectories. Also, don't expect things to make tons of sense if you
combine this with "-M" and there are cross-directory renames etc.

But even for git itself, you can get some fun statistics. Try out

git log --dirstat

and see the occasional mentions of things like Documentation/, git-gui/,
gitweb/ and gitk-git/. Or try out something like

git diff --dirstat v1.5.0..v1.5.4

which does kind of git an overview that shows *something*. But in general,
the output is more exciting for big projects with deeper structure, and
doing a

git diff --dirstat v2.6.24..v2.6.25-rc1

on the kernel is what I actually wrote this for!

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

git-gui: Automatically spell check commit messages... Shawn O. Pearce Thu, 7 Feb 2008 07:35:25 +0000 (02:35 -0500)

git-gui: Automatically spell check commit messages as the user types

Many user friendly tools like word processors, email editors and web
browsers allow users to spell check the message they are writing
as they type it, making it easy to identify a common misspelling
of a word and correct it on the fly.

We now open a bi-directional pipe to Aspell and feed the message
text the user is editing off to the program about once every 300
milliseconds. This is frequent enough that the user sees the results
almost immediately, but is not so frequent as to cause significant
additional load on the system. If the user has modified the message
text during the last 300 milliseconds we delay until the next period,
ensuring that we avoid flooding the Aspell process with a lot of
text while the user is actively typing their message.

We wait to send the current message buffer to Aspell until the user
is at a word boundary, thus ensuring that we are not likely to ask
for misspelled word detection on a word that the user is actively
typing, as most words are misspelled when only partially typed,
even if the user has thus far typed it correctly.

Misspelled words are highlighted in red and are given an underline,
causing the word to stand out from the others in the buffer. This is
a very common user interface idiom for displaying misspelled words,
but differs from one platform to the next in slight variations.
For example the Mac OS X system prefers using a dashed red underline,
leaving the word in the original text color. Unfortunately the
control that Tk gives us over text display is not powerful enough
to handle such formatting so we have to work with the least common
denominator.

The top suggestions for a misspelling are saved in an array and
offered to the user when they right-click (or on the Mac ctrl-click)
a misspelled word. Selecting an entry from this menu will replace
the misspelling with the correction shown. Replacement is integrated
with the undo/redo stack so undoing a replacement will restore the
misspelled original text.

If Aspell could not be started during git-gui launch we silently eat
the error and run without spell checking support. This way users
who do not have Aspell in their $PATH can continue to use git-gui,
although they will not get the advanced spelling functionality.

If Aspell started successfully the version line and language are
shown in git-gui's about box, below the Tcl/Tk versions. This way
the user can verify the Aspell function has been activated.

If Aspell crashes while we are running we inform the user with an
error dialog and then disable Aspell entirely for the rest of this
git-gui session. This prevents us from fork-bombing the system
with Aspell instances that always crash when presented with the
current message text, should there be a bug in either Aspell or in
git-gui's output to it.

We escape all input lines with ^, as recommended by the Aspell manual
page, as this allows Aspell to properly ignore any input line that is
otherwise looking like a command (e.g. ! to enable terse output). By
using this escape however we need to correct all word offsets by -1 as
Aspell is apparently considering the ^ escape to be part of the line's
character count, but our Tk text widget obviously does not.

Available dictionaries are offered in the Options dialog, allowing
the user to select the language they want to spellcheck commit
messages with for the current repository, as well as the global
user setting that all repositories inherit.

Special thanks to Adam Flott for suggesting connecting git-gui
to Aspell for the purpose of spell checking the commit message,
and to Wincent Colaiuta for the idea to wait for a word boundary
before passing the message over for checking.

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

Merge branch 'maint'Shawn O. Pearce Tue, 12 Feb 2008 07:35:03 +0000 (02:35 -0500)

Merge branch 'maint'

* maint:
git-gui: support Git Gui.app under OS X 10.5

git-gui: support Git Gui.app under OS X 10.5Jay Soffian Tue, 12 Feb 2008 02:33:52 +0000 (21:33 -0500)

git-gui: support Git Gui.app under OS X 10.5

The Tk Framework moved its location in 10.5 compared to 10.4

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Tested-by: Seth Falcon <seth@userprimary.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

.mailmap: adjust to a recent patch application glitch.Junio C Hamano Tue, 12 Feb 2008 07:14:53 +0000 (23:14 -0800)

.mailmap: adjust to a recent patch application glitch.

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

Update the main documentation (stale notes section)Junio C Hamano Tue, 12 Feb 2008 03:21:23 +0000 (19:21 -0800)

Update the main documentation (stale notes section)

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

Add compat/fopen.c which returns NULL on attempt to... Brandon Casey Sat, 9 Feb 2008 02:32:47 +0000 (20:32 -0600)

Add compat/fopen.c which returns NULL on attempt to open directory

Some systems do not fail as expected when fread et al. are called on
a directory stream. Replace fopen on such systems which will fail
when the supplied path is a directory.

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

Merge branch 'db/no-separate-ls-remote-connection'... Junio C Hamano Tue, 12 Feb 2008 00:47:07 +0000 (16:47 -0800)

Merge branch 'db/no-separate-ls-remote-connection' (early part)

* 'db/no-separate-ls-remote-connection' (early part):
Fix "git clone" for git:// protocol
Reduce the number of connects when fetching

Merge branch 'mw/send-email'Junio C Hamano Tue, 12 Feb 2008 00:46:36 +0000 (16:46 -0800)

Merge branch 'mw/send-email'

* mw/send-email:
git-send-email: Better handling of EOF
git-send-email: SIG{TERM,INT} handlers
git-send-email: ssh/login style password requests

Merge branch 'db/send-email-omit-cc'Junio C Hamano Tue, 12 Feb 2008 00:46:30 +0000 (16:46 -0800)

Merge branch 'db/send-email-omit-cc'

* db/send-email-omit-cc:
git-send-email: Generalize auto-cc recipient mechanism.

Merge branch 'jc/error-message-in-cherry-pick'Junio C Hamano Tue, 12 Feb 2008 00:46:27 +0000 (16:46 -0800)

Merge branch 'jc/error-message-in-cherry-pick'

* jc/error-message-in-cherry-pick:
Make error messages from cherry-pick/revert more sensible

Merge branch 'lt/in-core-index'Junio C Hamano Tue, 12 Feb 2008 00:46:20 +0000 (16:46 -0800)

Merge branch 'lt/in-core-index'

* lt/in-core-index:
lazy index hashing
Create pathname-based hash-table lookup into index
read-cache.c: introduce is_racy_timestamp() helper
read-cache.c: fix a couple more CE_REMOVE conversion
Also use unpack_trees() in do_diff_cache()
Make run_diff_index() use unpack_trees(), not read_tree()
Avoid running lstat(2) on the same cache entry.
index: be careful when handling long names
Make on-disk index representation separate from in-core one

Merge branch 'ph/describe-match'Junio C Hamano Tue, 12 Feb 2008 00:35:41 +0000 (16:35 -0800)

Merge branch 'ph/describe-match'

* ph/describe-match:
git-name-rev: add a --(no-)undefined option.
git-describe: Add a --match option to limit considered tags.

apply: do not barf on patch with too large an offsetJunio C Hamano Mon, 11 Feb 2008 23:32:29 +0000 (15:32 -0800)

apply: do not barf on patch with too large an offset

Previously a patch that records too large a line number caused the
offset matching code in git-apply to overstep its internal buffer.

Noticed by Johannes Schindelin.

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

[PATCH] gitk: properly deal with tag names containing... Gerrit Pape Mon, 11 Feb 2008 10:57:40 +0000 (10:57 +0000)

[PATCH] gitk: properly deal with tag names containing / (slash)

When creating a tag through gitk, and the tag name includes a slash (or
slashes), gitk errors out in a popup window. This patch makes gitk use
'git tag' to create the tag instead of modifying files in refs/tags/,
which fixes the issue; if 'git tag' throws an error, gitk pops up with
the error message.

The problem was reported by Frédéric Brière through
http://bugs.debian.org/464104

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

[PATCH] gitk: Add checkbutton to ignore space changesSteffen Prohaska Thu, 17 Jan 2008 22:42:55 +0000 (23:42 +0100)

[PATCH] gitk: Add checkbutton to ignore space changes

Ignoring space changes can be helpful. For example, a commit
claims to only reformat source code and you quickly want to
verify if this claim is true. Or a commit accidentally changes
code formatting and you want to focus on the real changes.

In such cases a button to toggle of whitespace changes would be
quite handy. You could quickly toggle between seeing and
ignoring whitespace changes.

This commit adds such a checkbutton right above the diff view.

However, in general it is a good thing to see whitespace changes
and therefore the state of the checkbutton is not saved. For
example, space changes might happen unintentionally. But they are
real changes yielding different sha1s for the blobs involved.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

[PATCH] gitk: Fix "Key bindings" messageMichele Ballabio Tue, 15 Jan 2008 22:31:49 +0000 (23:31 +0100)

[PATCH] gitk: Fix "Key bindings" message

The "Key bindings" message under the "Help" menu was too long
and could not be parsed by the translation engine.

Fix both issues by translating one line at a time.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

git-blame.el: show the when, who and what in the minibu... Junichi Uekawa Mon, 11 Feb 2008 15:00:07 +0000 (00:00 +0900)

git-blame.el: show the when, who and what in the minibuffer.

Change the default operation to show 'when (day the commit was made),
who (who made the commit), what (what the commit log was)' in the
minibuffer instead of SHA1 and title of the commit log.

Since the user may prefer other displaying options, it is made as a
user-configurable option.

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

Define the project whitespace policyJunio C Hamano Mon, 11 Feb 2008 03:34:34 +0000 (19:34 -0800)

Define the project whitespace policy

This establishes what the "bad" whitespaces are for this
project.

The rules are:

- Unless otherwise specified, indent with SP that could be
replaced with HT are not "bad". But SP before HT in the
indent is "bad", and trailing whitespaces are "bad".

- For C source files, initial indent by SP that can be replaced
with HT is also "bad".

- Test scripts in t/ and test vectors in its subdirectories can
contain anything, so we make it unrestricted for now.

Anything "bad" will be shown in WHITESPACE error indicator in
diff output, and "apply --whitespace=warn" will warn about it.

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

Add `git svn blame' commandTim Stoakes Sun, 10 Feb 2008 04:51:08 +0000 (15:21 +1030)

Add `git svn blame' command

This command is identical to `git blame', but it shows SVN revision
numbers instead of git commit hashes.

[ew: support "^initial commit" and minor formatting fixes]

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

Merge branch 'maint'Junio C Hamano Mon, 11 Feb 2008 21:23:06 +0000 (13:23 -0800)

Merge branch 'maint'

* maint: (35 commits)
config.c: guard config parser from value=NULL
builtin-log.c: guard config parser from value=NULL
imap-send.c: guard config parser from value=NULL
wt-status.c: guard config parser from value=NULL
setup.c: guard config parser from value=NULL
remote.c: guard config parser from value=NULL
merge-recursive.c: guard config parser from value=NULL
http.c: guard config parser from value=NULL
help.c: guard config parser from value=NULL
git.c: guard config parser from value=NULL
diff.c: guard config parser from value=NULL
convert.c: guard config parser from value=NULL
connect.c: guard config parser from value=NULL
builtin-tag.c: guard config parser from value=NULL
builtin-show-branch.c: guard config parser from value=NULL
builtin-reflog.c: guard config parser from value=NULL
builtin-log.c: guard config parser from value=NULL
builtin-config.c: guard config parser from value=NULL
builtin-commit.c: guard config parser from value=NULL
builtin-branch.c: guard config parser from value=NULL
...

config.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 21:10:27 +0000 (13:10 -0800)

config.c: guard config parser from value=NULL

user.{name,email}, core.{pager,editor,excludesfile,whitespace} and
i18n.{commit,logoutput}encoding all expect string values.

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

builtin-log.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 21:09:16 +0000 (13:09 -0800)

builtin-log.c: guard config parser from value=NULL

format.suffix expects a string value. format.numbered is bool plus "auto"

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

imap-send.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 20:04:00 +0000 (12:04 -0800)

imap-send.c: guard config parser from value=NULL

None of the configuration variables this expects is boolean.

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

wt-status.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 19:00:57 +0000 (11:00 -0800)

wt-status.c: guard config parser from value=NULL

status.color.* and color.status.* expect a string value

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

setup.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 19:00:32 +0000 (11:00 -0800)

setup.c: guard config parser from value=NULL

core.worktree expects a string value

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

remote.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 19:00:10 +0000 (11:00 -0800)

remote.c: guard config parser from value=NULL

branch.*.{remote,merge} expect a string value

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

merge-recursive.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:59:17 +0000 (10:59 -0800)

merge-recursive.c: guard config parser from value=NULL

merge.default, merge.*.{name,driver} expect a string value

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

http.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:57:22 +0000 (10:57 -0800)

http.c: guard config parser from value=NULL

http.sslcert and friends expect a string value

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

help.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:56:26 +0000 (10:56 -0800)

help.c: guard config parser from value=NULL

help.format configuration expects a string value

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

git.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:56:06 +0000 (10:56 -0800)

git.c: guard config parser from value=NULL

alias.* configuration expects a string value

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

diff.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:53:56 +0000 (10:53 -0800)

diff.c: guard config parser from value=NULL

diff.external, diff.*.command, diff.color.*, color.diff.* and
diff.*.funcname configuration variables expect a string value.

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

convert.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:53:36 +0000 (10:53 -0800)

convert.c: guard config parser from value=NULL

filter.*.smudge and filter.*.clean configuration variables expect a
string value.

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

connect.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:52:15 +0000 (10:52 -0800)

connect.c: guard config parser from value=NULL

core.gitproxy configuration expects a string value.

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

builtin-tag.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:51:31 +0000 (10:51 -0800)

builtin-tag.c: guard config parser from value=NULL

user.signingkey configuration expects a string value.

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

builtin-show-branch.c: guard config parser from value... Junio C Hamano Mon, 11 Feb 2008 18:51:03 +0000 (10:51 -0800)

builtin-show-branch.c: guard config parser from value=NULL

showbranch.default configuration expects a string value.

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

builtin-reflog.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:50:06 +0000 (10:50 -0800)

builtin-reflog.c: guard config parser from value=NULL

gc.reflogexpire and gc.reflogexpireunreachable configuration expect
a string value suitable for calling approxidate() with.

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

builtin-log.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:48:55 +0000 (10:48 -0800)

builtin-log.c: guard config parser from value=NULL

format.subjectprefix configuration expects a string value.

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

builtin-config.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:48:12 +0000 (10:48 -0800)

builtin-config.c: guard config parser from value=NULL

color configuration variables expect a string value.

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

builtin-commit.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:46:39 +0000 (10:46 -0800)

builtin-commit.c: guard config parser from value=NULL

commit.template configuration expects a string value.

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

builtin-branch.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:45:50 +0000 (10:45 -0800)

builtin-branch.c: guard config parser from value=NULL

color.branch.* configuration variables expect a string value.

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

builtin-apply.c: guard config parser from value=NULLJunio C Hamano Mon, 11 Feb 2008 18:44:49 +0000 (10:44 -0800)

builtin-apply.c: guard config parser from value=NULL

apply.whitespace configuration expects a string value.

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

Add config_error_nonbool() helper functionJunio C Hamano Mon, 11 Feb 2008 18:41:18 +0000 (10:41 -0800)

Add config_error_nonbool() helper function

This is used to report misconfigured configuration file that does not
give any value to a non-boolean variable, e.g.

[section]
var

It is perfectly fine to say it if the section.var is a boolean (it means
true), but if a variable expects a string value it should be flagged as
a configuration error.

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