gitweb.git
receive-pack: detect aliased updates which can occur... Jay Soffian Mon, 19 Apr 2010 22:19:18 +0000 (18:19 -0400)

receive-pack: detect aliased updates which can occur with symrefs

When pushing to a remote repo the sending side filters out aliased
updates (e.g., foo:baz bar:baz). However, it is not possible for the
sender to know if two refs are aliased on the receiving side via
symrefs. Here is one such scenario:

$ git init origin
$ (cd origin && touch file && git add file && git commit -a -m intial)
$ git clone --bare origin origin.git
$ rm -rf origin

$ git clone origin.git client

$ git clone --mirror client backup.git &&
$ (cd backup.git && git remote set-head origin --auto)

$ (cd client &&
git remote add --mirror backup ../backup.git &&
echo change1 > file && git commit -a -m change1 &&
git push origin &&
git push backup
)

The push to backup fails with:

Counting objects: 5, done.
Writing objects: 100% (3/3), 244 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
error: Ref refs/remotes/origin/master is at ef3... but expected 262...
remote: error: failed to lock refs/remotes/origin/master
To ../backup.git
262cd57..ef307ff master -> master
262cd57..ef307ff origin/HEAD -> origin/HEAD
! [remote rejected] origin/master -> origin/master (failed to lock)
error: failed to push some refs to '../backup.git'

The reason is that refs/remotes/origin/HEAD is a symref to
refs/remotes/origin/master, but it is not possible for the sending side
to unambiguously know this.

This commit fixes the issue by having receive-pack ignore any update to
a symref whose target is being identically updated. If a symref and its
target are being updated inconsistently, then the update for both fails
with an error message ("refusing inconsistent update...") to help
diagnose the situation.

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

receive-pack: switch global variable 'commands' to... Jay Soffian Mon, 19 Apr 2010 22:08:30 +0000 (18:08 -0400)

receive-pack: switch global variable 'commands' to a parameter

Receive-pack is inconsistent in its usage of the 'commands'
variable; though it is setup as a global and accessed that way by
execute_commands(), report(), and run_receive_hook(), it is also
passed as a parameter to delete_only() and run_update_post_hook().

For consistency, make it local to cmd_receive_pack and pass it as a
parameter. As long as we're cleaning up, also make our use of the
names 'commands' and 'cmd' consistent.

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

t7012: Mark missing tests as TODOMichael J Gruber Mon, 19 Apr 2010 08:14:32 +0000 (10:14 +0200)

t7012: Mark missing tests as TODO

Currently, there are 6 tests which are not even written but are
'test_expect_failure message false'.
Do not abuse test_expect_failure as a to do marker, but mark them as
'#TODO' instead.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c::new_http_pack_request: do away with the temp... Tay Ray Chuan Mon, 19 Apr 2010 14:46:43 +0000 (22:46 +0800)

http.c::new_http_pack_request: do away with the temp variable filename

Now that the temporary variable char *filename is only used in one
place, do away with it and just call sha1_pack_name() directly.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-fetch: Use temporary files for pack-*.idx until... Shawn O. Pearce Mon, 19 Apr 2010 14:23:10 +0000 (07:23 -0700)

http-fetch: Use temporary files for pack-*.idx until verified

Verify that a downloaded pack-*.idx file is consistent and valid
as an index file before we rename it into its final destination.
This prevents a corrupt index file from later being treated as a
usable file, confusing readers.

Check that we do not have the pack index file before invoking
fetch_pack_index(); that way, we can do without the has_pack_index()
check in fetch_pack_index().

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

http-fetch: Use index-pack rather than verify-pack... Shawn O. Pearce Mon, 19 Apr 2010 14:23:09 +0000 (07:23 -0700)

http-fetch: Use index-pack rather than verify-pack to check packs

To ensure we don't leave a corrupt pack file positioned as though
it were a valid pack file, run index-pack on the temporary pack
before we rename it to its final name. If index-pack crashes out
when it discovers file corruption (e.g. GitHub's error HTML at the
end of the file), simply delete the temporary files to cleanup.

By waiting until the pack has been validated before we move it
to its final name, we eliminate a race condition where another
concurrent reader might try to access the pack at the same time
that we are still trying to verify its not corrupt.

Switching from verify-pack to index-pack is a change in behavior,
but it should turn out better for users. The index-pack algorithm
tries to minimize disk seeks, as well as the number of times any
given object is inflated, by organizing its work along delta chains.
The verify-pack logic does not attempt to do this, thrashing the
delta base cache and the filesystem cache.

By recreating the index file locally, we also can automatically
upgrade from a v1 pack table of contents to v2. This makes the
CRC32 data available for use during later repacks, even if the
server didn't have them on hand.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow parse_pack_index on temporary filesShawn O. Pearce Mon, 19 Apr 2010 14:23:08 +0000 (07:23 -0700)

Allow parse_pack_index on temporary files

The easiest way to verify a pack index is to open it through the
standard parse_pack_index function, permitting the header check
to happen when the file is mapped. However, the dumb HTTP client
needs to verify a pack index before its moved into its proper file
name within the objects/pack directory, to prevent a corrupt index
from being made available. So permit the caller to specify the
exact path of the index file.

For now we're still using the final destination name within the
sole call site in http.c, but eventually we will start to parse
the temporary path instead.

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

Extract verify_pack_index for reuse from verify_packShawn O. Pearce Mon, 19 Apr 2010 14:23:07 +0000 (07:23 -0700)

Extract verify_pack_index for reuse from verify_pack

The dumb HTTP transport should verify an index is completely valid
before trying to use it. That requires checking the header/footer
but also checking the complete content SHA-1. All of this logic is
already in the front half of verify_pack, so pull it out into a new
function that can be reused.

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

Introduce close_pack_index to permit replacementShawn O. Pearce Mon, 19 Apr 2010 14:23:06 +0000 (07:23 -0700)

Introduce close_pack_index to permit replacement

By closing the pack index, a caller can later overwrite the index
with an updated index file, possibly after converting from v1 to
the v2 format. Because p->index_data is NULL after close, on the
next access the index will be opened again and the other members
will be updated with new data.

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

http.c: Remove unnecessary strdup of sha1_to_hex resultShawn O. Pearce Mon, 19 Apr 2010 14:23:05 +0000 (07:23 -0700)

http.c: Remove unnecessary strdup of sha1_to_hex result

Most of the time the dumb HTTP transport is run without the verbose
flag set, so we only need the result of sha1_to_hex(sha1) once, to
construct the pack URL. Don't bother with an unnecessary malloc,
copy, free chain of this buffer.

If verbose is set, we'll format the SHA-1 twice now. But this
tiny extra CPU time spent is nothing compared to the slowdown that
is usually imposed by the verbose messages being sent to the tty,
and is entirely trivial compared to the latency involved with the
remote HTTP server sending something as big as a pack file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

reflog: remove 'show' from 'expire's usage stringSZEDER Gábor Mon, 19 Apr 2010 09:52:30 +0000 (11:52 +0200)

reflog: remove 'show' from 'expire's usage string

Most of 'expire's options are not recognized by the 'show' subcommand,
hence it errors out.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.6' into maintJunio C Hamano Mon, 19 Apr 2010 08:28:27 +0000 (01:28 -0700)

Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:
MSVC: Fix build by adding missing termios.h dummy

MSVC: Fix build by adding missing termios.h dummyJohannes Sixt Mon, 19 Apr 2010 07:37:20 +0000 (09:37 +0200)

MSVC: Fix build by adding missing termios.h dummy

A use of this header file was introduced in eb80042 (Add missing #include
to support TIOCGWINSZ on Solaris, 2010-01-11).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.1-rc2 v1.7.1-rc2Junio C Hamano Mon, 19 Apr 2010 05:19:04 +0000 (22:19 -0700)

Git 1.7.1-rc2

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

Merge branch 'rr/remote-helper-doc'Junio C Hamano Mon, 19 Apr 2010 04:32:25 +0000 (21:32 -0700)

Merge branch 'rr/remote-helper-doc'

* rr/remote-helper-doc:
Documentation/remote-helpers: Fix typos and improve language
Fixup: Second argument may be any arbitrary string
Documentation/remote-helpers: Add invocation section
Documentation/urls: Rewrite to accomodate <transport>::<address>
Documentation/remote-helpers: Rewrite description

Merge branch 'wp/doc-filter-direction'Junio C Hamano Mon, 19 Apr 2010 04:32:21 +0000 (21:32 -0700)

Merge branch 'wp/doc-filter-direction'

* wp/doc-filter-direction:
documentation: clarify direction of core.autocrlf

Merge branch 'jk/maint-diffstat-overflow'Junio C Hamano Mon, 19 Apr 2010 04:31:50 +0000 (21:31 -0700)

Merge branch 'jk/maint-diffstat-overflow'

* jk/maint-diffstat-overflow:
diff: use large integers for diffstat calculations

Merge branch 'jg/auto-initialize-notes-with-percent... Junio C Hamano Mon, 19 Apr 2010 04:31:29 +0000 (21:31 -0700)

Merge branch 'jg/auto-initialize-notes-with-percent-n-in-format'

* jg/auto-initialize-notes-with-percent-n-in-format:
t3301: add tests to use --format="%N"
pretty: Initialize notes if %N is used

Merge branch 'maint'Junio C Hamano Mon, 19 Apr 2010 04:31:20 +0000 (21:31 -0700)

Merge branch 'maint'

* maint:
Documentation: Describe other situations where -z affects git diff

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Mon, 19 Apr 2010 01:36:41 +0000 (18:36 -0700)

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

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Display dirty submodules correctly
gitk: Fix display of copyright symbol
gitk: Add emacs editor variable block
gitk: Avoid calling tk_setPalette on Windows
gitk: Don't clobber "Remember this view" setting
gitk: Add comments to explain encode_view_opts and decode_view_opts
gitk: Use consistent font for all text input fields
gitk: Set the font for all listbox widgets
gitk: Set the font for all spinbox widgets
gitk: Remove forced use of sans-serif font
gitk: Add Ctrl-W shortcut for closing the active window

Documentation/remote-helpers: Fix typos and improve... Ramkumar Ramachandra Sun, 18 Apr 2010 00:57:37 +0000 (06:27 +0530)

Documentation/remote-helpers: Fix typos and improve language

Fix some typos and errors in grammar and tense.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fixup: Second argument may be any arbitrary stringRamkumar Ramachandra Sun, 18 Apr 2010 00:56:37 +0000 (06:26 +0530)

Fixup: Second argument may be any arbitrary string

This is intended to be a fixup for commit ad466d1 in pu. As Jonathan
Neider pointed out, the second argument may be any arbitrary string,
and need not conform to any URL-like shape.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/remote-helpers: Add invocation sectionRamkumar Ramachandra Wed, 7 Apr 2010 05:44:41 +0000 (11:14 +0530)

Documentation/remote-helpers: Add invocation section

Add an 'Invocation' section to specify what the command line arguments
mean. Also include a link to git-remote in the 'See Also' section.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/urls: Rewrite to accomodate <transport... Ramkumar Ramachandra Tue, 6 Apr 2010 08:38:19 +0000 (14:08 +0530)

Documentation/urls: Rewrite to accomodate <transport>::<address>

Rewrite the first part of the document to explicitly show differences
between the URLs that can be used with different transport
protocols. Mention <transport>::<address> format to explicitly invoke
a remote helper.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/remote-helpers: Rewrite descriptionRamkumar Ramachandra Sun, 28 Mar 2010 18:03:50 +0000 (23:33 +0530)

Documentation/remote-helpers: Rewrite description

Rewrite the description section to describe what exactly remote
helpers are and the need for them. Also mention the curl family of
remote helpers as an example.

[jc: with readability fixes from Jonathan squashed in]

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Describe other situations where -z affec... Charles Bailey Sun, 18 Apr 2010 18:28:17 +0000 (19:28 +0100)

Documentation: Describe other situations where -z affects git diff

-z also alters the behaviour of --name-only and --name-status.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase-interactive: silence warning when no commits... Jeff King Sun, 18 Apr 2010 12:01:45 +0000 (08:01 -0400)

rebase-interactive: silence warning when no commits rewritten

If you do a "rebase -i" and don't change any commits,
nothing is rewritten, and we have no REWRITTEN_LIST. The
shell prints out an ugly message:

$ GIT_EDITOR=true git rebase -i HEAD^
/path/to/git-rebase--interactive: 1: cannot open
/path/to/repo/.git/rebase-merge/rewritten-list: No such file
Successfully rebased and updated refs/heads/master.

We can fix it by not running "notes copy" at all if nothing
was rewritten.

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

t3301: add tests to use --format="%N"Junio C Hamano Sun, 18 Apr 2010 18:19:39 +0000 (11:19 -0700)

t3301: add tests to use --format="%N"

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

reflog --expire-unreachable: special case entries in... Junio C Hamano Fri, 9 Apr 2010 20:20:02 +0000 (13:20 -0700)

reflog --expire-unreachable: special case entries in "HEAD" reflog

"git reflog expire" (and "git gc") examines the reflog entries and
discards old/stale ones using two criteria. The entries that are older
than "reflogexpire" (defaults to 90 days) are unconditionally removed, and
the entries that are older than "reflogexpireunreachable" (defaults to 30
days) are removed if the entry point at commits that are not reachable
from the value of the ref.

This is reasonable for local branches, remote tracking branches and tags.
You (or other people) may have failed experiments that have been made and
then later discarded by resetting the tip of the branch back, and setting
the value of "reflogexpireunreachable" shorter than that of "reflogexpire"
will prune the entries that describe these failed experiments earlier than
the entries that describe the steps that led to the current history.

It however doesn't make much sense for "HEAD" reflog. When you switch
between branches, it is normal that the tip of the branch you were on is
not an ancestor of the branch you have switched to. The moral equivalent
of expiring failed experiments in per-branch reflog for "HEAD" reflog is
to expire entries that talk about commits that cannot be reached from any
ref.

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

more war on "sleep" in testsJunio C Hamano Wed, 14 Apr 2010 22:09:57 +0000 (15:09 -0700)

more war on "sleep" in tests

Two more tests that sleep only to waste tick can be converted to use
test_tick and take expiry parameters relative to $test_tick. The basic
idea is to replace "sleep 1" with "test_tick" to cause the "time" to pass.

These tests are interested in expiring things with "now" as the timestamp,
soo use a timestamp relative to $test_tick to give them more stability and
reproducibility.

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

http.c: Don't store destination name in request structuresShawn O. Pearce Sat, 17 Apr 2010 20:07:38 +0000 (13:07 -0700)

http.c: Don't store destination name in request structures

The destination name within the object store is easily computed
on demand, reusing a static buffer held by sha1_file.c. We don't
need to copy the entire path into the request structure for safe
keeping, when it can be easily reformatted after the download has
been completed.

This reduces the size of the per-request structure, and removes
yet another PATH_MAX based limit.

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

http.c: Drop useless != NULL test in finish_http_pack_r... Shawn O. Pearce Sat, 17 Apr 2010 20:07:37 +0000 (13:07 -0700)

http.c: Drop useless != NULL test in finish_http_pack_request

The test preq->packfile != NULL is always true. If packfile was
actually NULL when entering this function the ftell() above would
crash out with a SIGSEGV, resulting in never reaching this point.

Simplify the code by just removing the conditional.

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

http.c: Tiny refactoring of finish_http_pack_requestShawn O. Pearce Sat, 17 Apr 2010 20:07:36 +0000 (13:07 -0700)

http.c: Tiny refactoring of finish_http_pack_request

Always remove the struct packed_git from the active list, even
if the rename of the temporary file fails.

While we are here, simplify the code a bit by using a common
local variable name ("p") to hold the relevant packed_git.

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

t5550-http-fetch: Use subshell for repository operationsShawn O. Pearce Sat, 17 Apr 2010 20:07:35 +0000 (13:07 -0700)

t5550-http-fetch: Use subshell for repository operations

Change into the server repository's directory using a subshell,
so we can return back to the top of the trash directory before
doing anything more in the test script.

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

http.c: Remove bad free of static blockShawn O. Pearce Sat, 17 Apr 2010 20:07:34 +0000 (13:07 -0700)

http.c: Remove bad free of static block

The filename variable here is pointing to a block of memory that
was allocated by sha1_file.c and is also held in a static variable
scoped within the sha1_pack_name() function. Doing a free() here is
returning that memory to the allocator while we might still try to
reuse it on a subsequent sha1_pack_name() invocation. That's not
acceptable, so don't free it.

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

Merge branch 'maint'Junio C Hamano Sat, 17 Apr 2010 19:40:45 +0000 (12:40 -0700)

Merge branch 'maint'

* maint:
t1010-mktree: Adjust expected result to code and documentation
combined diff: correctly handle truncated file
Document new "already-merged" rule for branch -d

t6006: do not write to /tmpMatthew Ogilvie Sat, 17 Apr 2010 02:29:18 +0000 (20:29 -0600)

t6006: do not write to /tmp

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-instaweb: pass through invoking user's path to... Chris Webb Thu, 15 Apr 2010 13:29:45 +0000 (14:29 +0100)

git-instaweb: pass through invoking user's path to gitweb CGI scripts

When used with lighttpd or mongoose, git-instaweb previously passed a
hard-coded, default value of PATH to the gitweb CGI script. Use the invoking
user's value for PATH for this instead. (This is already implicitly the
behaviour for other web servers supported by git-instaweb.)

Signed-off-by: Chris Webb <chris@arachsys.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

gitweb: simplify gitweb.min.* generation and clean... Junio C Hamano Thu, 15 Apr 2010 12:57:18 +0000 (08:57 -0400)

gitweb: simplify gitweb.min.* generation and clean-up rules

GITWEB_CSS and GITWEB_JS are meant to be "what URI should the installed
cgi script use to refer to the stylesheet and JavaScript", never "this
is the name of the file we are building". Don't use them to decide what
file to build minified versions in.

While we are at it, lose FILES that is used only for "clean" target in a
misguided way. "make clean" should try to remove all the potential
build artifacts regardless of a minor configuration change. Instead of
trying to remove only the build product "make clean" would have created
if it were run without "clean", explicitly list the three potential build
products for removal.

Tested-by: Mark Rada <marada@uwaterloo.co>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tag -v: use RUN_GIT_CMD to run verify-tagJonathan Nieder Thu, 15 Apr 2010 09:36:25 +0000 (04:36 -0500)

tag -v: use RUN_GIT_CMD to run verify-tag

This is the preferred way to run a git command.

The only obvious observable effects I can think of are that the exec
is properly reported in GIT_TRACE output and that verifying signed
tags will still work if the git-verify-tag hard link in gitexecdir
goes missing.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

documentation: clarify direction of core.autocrlfWill Palmer Sat, 17 Apr 2010 16:55:26 +0000 (17:55 +0100)

documentation: clarify direction of core.autocrlf

The description for core.autocrlf refers to reads from / writes to
"the filesystem", the only use of this rather ambiguous term, which
technically could be referring to the git object database. (All other
mentions are part of phrases such as "..filesystems (like NFS)..").

Other sections, including the section on core.safecrlf, use the term
"work tree" for the same purpose as the term "the filesystem" is used in
the core.autocrlf section, so that seems like a good alternative, which
makes it clearer what direction the addition/removal of CR characters
occurs in.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: use large integers for diffstat calculationsJeff King Sat, 17 Apr 2010 17:41:08 +0000 (13:41 -0400)

diff: use large integers for diffstat calculations

The diffstat "added" and "changed" fields generally store
line counts; however, for binary files, they store file
sizes. Since we store and print these values as ints, a
diffstat on a file larger than 2G can show a negative size.
Instead, let's use uintmax_t, which should be at least 64
bits on modern platforms.

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

t1010-mktree: Adjust expected result to code and docume... Michael J Gruber Thu, 15 Apr 2010 09:34:07 +0000 (11:34 +0200)

t1010-mktree: Adjust expected result to code and documentation

The last two tests here were always supposed to fail in the sense
that, according to code and documentation, mktree should read non-recursive
ls-tree output, but not recursive one, and therefore explicitely refuses
to deal with slashes.

Adjust the test (must_fail) so that it succeeds when mktree dies on
slashes.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

combined diff: correctly handle truncated fileThomas Rast Thu, 15 Apr 2010 12:59:37 +0000 (14:59 +0200)

combined diff: correctly handle truncated file

Consider an evil merge of two commits A and B, both of which have a
file 'foo', but the merge result does not have that file.

The combined-diff code learned in 4462731 (combine-diff: do not punt
on removed or added files., 2006-02-06) to concisely show only the
removal, since that is the evil part and the previous contents are
presumably uninteresting.

However, to diagnose an empty merge result, it overloaded the variable
that holds the file's length. This means that the check also triggers
for truncated files. Consequently, such files were not shown in the
diff at all despite the merge being clearly evil.

Fix this by adding a new variable that distinguishes whether the file
was deleted (which is the case 4462731 handled) or truncated. In the
truncated case, we show the full combined diff again, which is rather
spammy but at least does not hide the evilness.

Reported-by: David Martínez Martí <desarrollo@gestiweb.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Display dirty submodules correctlyJens Lehmann Fri, 9 Apr 2010 20:16:42 +0000 (22:16 +0200)

gitk: Display dirty submodules correctly

Since recently "git diff --submodule" prints out extra lines when the
submodule contains untracked or modified files. Show all those lines of
one submodule under the same header.

Also for newly added or removed submodules the submodule name contained
trailing garbage because the extraction of the name was not done right.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

autoconf: Check if <paths.h> exists and set HAVE_PATHS_HJakub Narebski Thu, 15 Apr 2010 12:27:49 +0000 (05:27 -0700)

autoconf: Check if <paths.h> exists and set HAVE_PATHS_H

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

exec_cmd.c: replace hard-coded path list with one from... Chris Webb Tue, 13 Apr 2010 09:07:13 +0000 (10:07 +0100)

exec_cmd.c: replace hard-coded path list with one from <paths.h>

The default executable path list used by exec_cmd.c is hard-coded to
be "/usr/local/bin:/usr/bin:/bin". Use an appropriate value for the
system from <paths.h> when available.

Add HAVE_PATHS_H make variables and enable it on Linux, FreeBSD,
NetBSD, OpenBSD and GNU where it is known to exist for now. Somebody
else may want to do an autoconf support later.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document new "already-merged" rule for branch -dJonathan Nieder Thu, 15 Apr 2010 07:25:38 +0000 (02:25 -0500)

Document new "already-merged" rule for branch -d

v1.7.0-rc0~18^2 (branch -d: base the "already-merged" safety on the
branch it merges with, 2009-12-29) taught ‘git branch’ a new heuristic
for when it is safe to delete a branch without forcing the issue. It
is safe to delete a branch "topic" without second thought if:

- the branch "topic" is set up to pull from a (remote-tracking,
usually) branch and is fully merged in that "upstream" branch, or

- there is no branch.topic.merge configuration and branch "topic" is
fully merged in the current HEAD.

Update the man page to acknowledge the new rules.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add .depend directories to .gitignoreJonathan Nieder Thu, 15 Apr 2010 07:35:20 +0000 (02:35 -0500)

Add .depend directories to .gitignore

The makefile snippets that would land in these directories are already
being ignored. Ignore the directories instead so they don’t show up
in ‘git clean -n’ output.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7006: guard cleanup with test_expect_successJonathan Nieder Thu, 15 Apr 2010 00:38:07 +0000 (19:38 -0500)

t7006: guard cleanup with test_expect_success

Most of these tests are removing files, environment variables, and
configuration that might interfere outside the test. Putting these
clean-up commands in the test (in the same spirit as v1.7.1-rc0~59,
2010-03-20) means that errors during setup will be caught quickly and
non-error text will be suppressed without -v.

While at it, apply some other minor fixes:

- do not rely on the shell to export variables defined with the same
command as a function call

- avoid whitespace immediately after the > redirection operator, for
consistency with the style of other tests

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document gc.<pattern>.reflogexpire variablesJunio C Hamano Wed, 14 Apr 2010 20:12:34 +0000 (13:12 -0700)

Document gc.<pattern>.reflogexpire variables

3cb22b8 (Per-ref reflog expiry configuration, 2008-06-15) added support
for setting the expiry parameters differently for different reflog, but
it was never documented.

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

am -3: recover the diagnostic messages for corrupt... Junio C Hamano Fri, 9 Apr 2010 23:58:28 +0000 (16:58 -0700)

am -3: recover the diagnostic messages for corrupt patches

"git am -3" first tries to apply the patch without any extra trick, and
applies it to a synthesized tree for 3-way merge after the first attempt
fails. "git apply" exits with status 1 for a patch that is well-formed
but is not applicable (and it dies on other errors with non-zereo, non-1
status) and has an optimization to fall back to the 3-way merge only in
the case.

An earlier patch 3ddd170 (am: suppress apply errors when using 3-way,
2009-06-16) squelched diagnostic messages from the first attempt, not to
be shown to the end user. This worked reasonably well if the reason the
first application failed was because the patch was made against a wrong
version.

When the patch is corrupt (e.g. line-wrapped or leading whitespaces got
dropped), however, because the second patch application is not even
attempted, the error message from the first application is never shown
and is forever lost. This message is necessary to locate where the patch
is corrupt and fix it up.

We could fix this issue by reverting 3dd170, or keeping the error message
to somewhere and showing it, but because this is an error codepath, the
easiest is to disable the optimization. The second patch application is
attempted even when the input is corrupt, and it will notice, diagnose,
and stop with an error message.

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

diff: add --word-diff option that generalizes --color... Thomas Rast Wed, 14 Apr 2010 15:59:06 +0000 (17:59 +0200)

diff: add --word-diff option that generalizes --color-words

This teaches the --color-words engine a more general interface that
supports two new modes:

* --word-diff=plain, inspired by the 'wdiff' utility (most similar to
'wdiff -n <old> <new>'): uses delimiters [-removed-] and {+added+}

* --word-diff=porcelain, which generates an ad-hoc machine readable
format:
- each diff unit is prefixed by [-+ ] and terminated by newline as
in unified diff
- newlines in the input are output as a line consisting only of a
tilde '~'

Both of these formats still support color if it is enabled, using it
to highlight the differences. --color-words becomes a synonym for
--word-diff=color, which is the color-only format. Also adds some
compatibility/convenience options.

Thanks to Junio C Hamano and Miles Bader for good ideas.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 14 Apr 2010 01:21:29 +0000 (18:21 -0700)

Merge branch 'maint'

* maint:
Documentation/config.txt: default gc.aggressiveWindow is 250, not 10
Docs: Add -X option to git-merge's synopsis.

Conflicts:
Documentation/merge-options.txt

pretty: Initialize notes if %N is usedJohannes Gilger Tue, 13 Apr 2010 20:31:12 +0000 (22:31 +0200)

pretty: Initialize notes if %N is used

When using git log --pretty='%N' without an explicit --show-notes, git
would segfault. This patches fixes this behaviour by loading the needed
notes datastructures if --pretty is used and the format contains %N.
When --pretty='%N' is used together with --no-notes, %N won't be
expanded.

This is an extension to a proposed patch by Jeff King.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

describe: Break annotated tag ties by tagger dateShawn O. Pearce Mon, 12 Apr 2010 23:25:29 +0000 (16:25 -0700)

describe: Break annotated tag ties by tagger date

If more than one annotated tag points at the same commit, use the
tag whose tagger field has a more recent date stamp. This resolves
non-deterministic cases where the maintainer has done:

$ git tag -a -m "2.1-rc1" v2.1-rc1 deadbeef
$ git tag -a -m "2.1" v2.1 deadbeef

If the tag is an older-style annotated tag with no tagger date, we
assume a date stamp at the UNIX epoch. This will cause us to prefer
an annotated tag that has a valid date.

We could also try to consider the tag object chain, favoring a tag
that "includes" another one:

$ git tag -a -m "2.1-rc0" v2.1-rc1 deadbeef
$ git tag -a -m "2.1" v2.1 v2.1-rc1

However traversing the tag's object chain looking for inclusion
is much more complicated. Its already very likely that even in
these cases the v2.1 tag will have a more recent tagger date than
v2.1-rc1, so with this change describe should still resolve this
by selecting the more recent v2.1.

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

Documentation/config.txt: default gc.aggressiveWindow... Jay Soffian Tue, 13 Apr 2010 16:52:55 +0000 (12:52 -0400)

Documentation/config.txt: default gc.aggressiveWindow is 250, not 10

The default for gc.aggressiveWindow has been 250 since 1c192f3
(gc --aggressive: make it really aggressive, 2007-12-06).

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

t5800: testgit helper requires Python supportJonathan Nieder Mon, 12 Apr 2010 14:24:28 +0000 (09:24 -0500)

t5800: testgit helper requires Python support

git remote-testgit is written in Python. In a NO_PYTHON build, tests
using it would fail, so skip them.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tag.c: Parse tagger date (if present)Shawn O. Pearce Mon, 12 Apr 2010 23:25:28 +0000 (16:25 -0700)

tag.c: Parse tagger date (if present)

Just like with committer dates, we parse the tagger date into the
struct tag so its available for further downstream processing.
However since the tagger header was not introduced until Git 0.99.1
we must consider it optional. For tags missing this header we use
the default date of 0.

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

tag.c: Refactor parse_tag_buffer to be saner to programShawn O. Pearce Mon, 12 Apr 2010 23:25:27 +0000 (16:25 -0700)

tag.c: Refactor parse_tag_buffer to be saner to program

This code was horribly ugly to follow. The structure of the headers
in an annotated tag object must follow a prescribed order, and most
of these are required. Simplify the entire parsing logic by going
through the headers in the order they are supposed to appear in,
acting on each header as its identified in the buffer.

This change has the same behavior as the older version, its just
easier to read and maintain.

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

tag.h: Remove unused signature fieldShawn O. Pearce Mon, 12 Apr 2010 23:25:26 +0000 (16:25 -0700)

tag.h: Remove unused signature field

Its documented as unused. So lets just drop it from the structure
since we haven't ever used it.

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

tag.c: Correct indentationShawn O. Pearce Mon, 12 Apr 2010 23:25:25 +0000 (16:25 -0700)

tag.c: Correct indentation

These lines were incorrectly indented with spaces, violating our
coding style. Its annoying to read with 4 position tab stops, so
fix the indentation to be correct.

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

index-pack: smarter memory usage when appending objectsNicolas Pitre Mon, 12 Apr 2010 20:50:35 +0000 (16:50 -0400)

index-pack: smarter memory usage when appending objects

In the same spirit as commit 9892bebafe, let's avoid allocating the full
buffer for the deflated data in write_compressed() in order to write it.
Let's deflate and write the data in chunks instead to reduce memory
usage.

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

index-pack: rationalize unpack_entry_data()Nicolas Pitre Mon, 12 Apr 2010 16:12:06 +0000 (12:12 -0400)

index-pack: rationalize unpack_entry_data()

Rework the loop to remove duplicated calls to use() and fill(), and
to make the code easier to read.

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

index-pack: smarter memory usage when resolving deltasNicolas Pitre Mon, 12 Apr 2010 16:11:07 +0000 (12:11 -0400)

index-pack: smarter memory usage when resolving deltas

In the same spirit as commit 9892bebafe, let's avoid allocating the full
buffer for the deflated data in get_data_from_pack() in order to inflate
it. Let's read and inflate the data in chunks instead to reduce memory
usage.

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

Docs: Add -X option to git-merge's synopsis.Marc Branchaud Mon, 12 Apr 2010 16:28:13 +0000 (12:28 -0400)

Docs: Add -X option to git-merge's synopsis.

Also move -X's description next to -s's in merge-options.txt.

This makes it easier to learn how to specify merge strategy options.

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

Merge branch 'jl/maint-submodule-gitfile-awareness'Junio C Hamano Sun, 11 Apr 2010 20:54:28 +0000 (13:54 -0700)

Merge branch 'jl/maint-submodule-gitfile-awareness'

* jl/maint-submodule-gitfile-awareness:
Windows: start_command: Support non-NULL dir in struct child_process

Windows: start_command: Support non-NULL dir in struct... Johannes Sixt Sun, 11 Apr 2010 20:40:12 +0000 (22:40 +0200)

Windows: start_command: Support non-NULL dir in struct child_process

A caller of start_command can set the member 'dir' to a directory to
request that the child process starts with that directory as CWD. The first
user of this feature was added recently in eee49b6 (Teach diff --submodule
and status to handle .git files in submodules).

On Windows, we have been lazy and had not implemented support for this
feature, yet. This fixes the shortcoming.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.7.0.5Junio C Hamano Sun, 11 Apr 2010 20:44:17 +0000 (13:44 -0700)

Sync with 1.7.0.5

Merge branch 'jc/doc-submit-gmail'Junio C Hamano Sun, 11 Apr 2010 20:44:05 +0000 (13:44 -0700)

Merge branch 'jc/doc-submit-gmail'

* jc/doc-submit-gmail:
SubmittingPatches: update GMail section

Git 1.7.0.5 v1.7.0.5Junio C Hamano Sun, 11 Apr 2010 20:41:43 +0000 (13:41 -0700)

Git 1.7.0.5

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

Merge branch 'rc/maint-reflog-msg-for-forced-branch... Junio C Hamano Sun, 11 Apr 2010 20:39:47 +0000 (13:39 -0700)

Merge branch 'rc/maint-reflog-msg-for-forced-branch' into maint

* rc/maint-reflog-msg-for-forced-branch:
branch: say "Reset to" in reflog entries for 'git branch -f' operations

blame documentation: -M/-C notice copied lines as well... Junio C Hamano Sun, 11 Apr 2010 19:17:42 +0000 (12:17 -0700)

blame documentation: -M/-C notice copied lines as well as moved ones

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

t3507: Make test executableStephen Boyd Sun, 11 Apr 2010 08:43:46 +0000 (01:43 -0700)

t3507: Make test executable

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7400: clarify submodule update testsJonathan Nieder Sat, 10 Apr 2010 05:39:41 +0000 (00:39 -0500)

t7400: clarify submodule update tests

In particular, add a missing && to the update --init test.

The goal is to make it clearer what happened when one of these
tests fails. The update --init test is currently (consistently)
failing on a few unusual machines.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7400: clarify 'submodule add' testsJonathan Nieder Sat, 10 Apr 2010 05:39:04 +0000 (00:39 -0500)

t7400: clarify 'submodule add' tests

A new reader may not realize what properties the $submodurl
repository needs to have.

One of the tests is checking that ‘submodule add -b foo’ creates
a ‘foo’ branch. Put this test in context by checking that
without -b, no ‘foo’ branch is created.

While at it, make sure each added submodule is a reasonable
repository, with clean index, no stray files, and so on.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7400: split setup into multiple testsJonathan Nieder Sat, 10 Apr 2010 05:38:37 +0000 (00:38 -0500)

t7400: split setup into multiple tests

The setup in t7400-submodule-basic does a number of different
things to support different tests. Splitting it up makes the
test a little easier to read and should provide an opportunity
to move each piece of setup closer to the tests that require it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

attr: Expand macros immediately when encountered.Henrik Grubbström Tue, 6 Apr 2010 12:46:44 +0000 (14:46 +0200)

attr: Expand macros immediately when encountered.

When using macros it is otherwise hard to know whether an
attribute set by the macro should override an already set
attribute. Consider the following .gitattributes file:

[attr]mybinary binary -ident
* ident
foo.bin mybinary
bar.bin mybinary ident

Without this patch both foo.bin and bar.bin will have
the ident attribute set, which is probably not what
the user expects. With this patch foo.bin will have an
unset ident attribute, while bar.bin will have it set.

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

attr: Allow multiple changes to an attribute on the... Henrik Grubbström Tue, 6 Apr 2010 12:46:43 +0000 (14:46 +0200)

attr: Allow multiple changes to an attribute on the same line.

When using macros it isn't inconceivable to have an attribute
being set by a macro, and then being reset explicitly.

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

attr: Fixed debug output for macro expansion.Henrik Grubbström Tue, 6 Apr 2010 12:46:42 +0000 (14:46 +0200)

attr: Fixed debug output for macro expansion.

When debug_set() was called during macro expansion, it
received a pointer to a struct git_attr rather than a
string.

Signed-off-by: Henrik Grubbström <grubba@grubba.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.1-rc1 v1.7.1-rc1Junio C Hamano Sat, 10 Apr 2010 20:05:16 +0000 (13:05 -0700)

Git 1.7.1-rc1

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

Merge branch 'mr/gitweb-jsmin'Junio C Hamano Sat, 10 Apr 2010 20:02:22 +0000 (13:02 -0700)

Merge branch 'mr/gitweb-jsmin'

* mr/gitweb-jsmin:
gitweb: update INSTALL to use shorter make target
gitweb: add documentation to INSTALL regarding gitweb.js
instaweb: add minification awareness
Gitweb: add autoconfigure support for minifiers
Gitweb: add support for minifying gitweb.css
Gitweb: add ignore and clean rules for minified files

send-email: Cleanup smtp-domain and add configBrian Gernhardt Sat, 10 Apr 2010 14:53:56 +0000 (10:53 -0400)

send-email: Cleanup smtp-domain and add config

The way the code stored --smtp-domain was unlike its handling of other
similar options. Bring it in line with the others by:

- Renaming $mail_domain to $smtp_domain to match the command line
option. Also move its declaration from near the top of the file to
near other option variables.

- Removing $mail_domain_default. The variable was used once and only
served to move the default away from where it gets used.

- Adding a sendemail.smtpdomain config option. smtp-domain was the
only SMTP configuration option that couldn't be set in the user's
.gitconfig.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document send-email --smtp-domainBrian Gernhardt Sat, 10 Apr 2010 14:53:55 +0000 (10:53 -0400)

Document send-email --smtp-domain

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: Don't use FQDNs without a '.'Brian Gernhardt Sat, 10 Apr 2010 14:53:54 +0000 (10:53 -0400)

send-email: Don't use FQDNs without a '.'

Although Net::Domain::domainname attempts to be very thorough, the
host's configuration can still refuse to give a FQDN. Check to see if
what we receive contains a dot as a basic sanity check.

Since the same condition is used twice and getting complex, let's move
it to a new function.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: Cleanup { styleBrian Gernhardt Sat, 10 Apr 2010 14:53:53 +0000 (10:53 -0400)

send-email: Cleanup { style

As Jakub Narebski pointed out on the list, Perl code usually prefers

sub func {
}

over

sub func
{
}

git-send-email.perl is somewhat inconsistent in its style, with 23
subroutines using the first style and 6 using the second. Convert the
few odd subroutines so that the code matches normal Perl style.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jl/maint-submodule-gitfile-awareness'Junio C Hamano Sat, 10 Apr 2010 19:13:46 +0000 (12:13 -0700)

Merge branch 'jl/maint-submodule-gitfile-awareness'

* jl/maint-submodule-gitfile-awareness:
Teach diff --submodule and status to handle .git files in submodules

Teach diff --submodule and status to handle .git files... Jens Lehmann Sat, 10 Apr 2010 17:01:12 +0000 (19:01 +0200)

Teach diff --submodule and status to handle .git files in submodules

The simple test for an existing .git directory gives an incorrect result
if .git is a file that records "gitdir: overthere". So for submodules that
use a .git file, "git status" and the diff family - when the "--submodule"
option is given - did assume the submodule was not populated at all when
a .git file was used, thus generating wrong output or no output at all.

This is fixed by using read_gitfile_gently() to get the correct location
of the .git directory. While at it, is_submodule_modified() was cleaned up
to use the "dir" member of "struct child_process" instead of setting the
GIT_WORK_TREE and GIT_DIR environment variables.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

status: --ignored option shows ignored filesJunio C Hamano Sat, 10 Apr 2010 07:33:17 +0000 (00:33 -0700)

status: --ignored option shows ignored files

There is no stronger reason behind the choice of "!!" than just I happened
to have typed them.

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

wt-status: rename and restructure status-print-untrackedJunio C Hamano Sat, 10 Apr 2010 07:19:46 +0000 (00:19 -0700)

wt-status: rename and restructure status-print-untracked

I will be reusing this to show ignored stuff in the next patch.

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

wt-status: collect ignored filesJunio C Hamano Sat, 10 Apr 2010 07:11:53 +0000 (00:11 -0700)

wt-status: collect ignored files

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

wt-status: plug memory leak while collecting untracked... Junio C Hamano Sat, 10 Apr 2010 06:58:27 +0000 (23:58 -0700)

wt-status: plug memory leak while collecting untracked files

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

wt-status: remove unused workdir_untracked memberJunio C Hamano Sat, 10 Apr 2010 06:34:40 +0000 (23:34 -0700)

wt-status: remove unused workdir_untracked member

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

Merge branch 'maint'Junio C Hamano Sat, 10 Apr 2010 05:43:18 +0000 (22:43 -0700)

Merge branch 'maint'

* maint:
Let check_preimage() use memset() to initialize "struct checkout"
fetch/push: fix usage strings

Let check_preimage() use memset() to initialize "struct... Jens Lehmann Fri, 9 Apr 2010 20:08:35 +0000 (22:08 +0200)

Let check_preimage() use memset() to initialize "struct checkout"

Every code site except check_preimage() uses either memset() or declares
a static instance of "struct checkout" to achieve proper initialization.
Lets use memset() instead of explicit initialization of all members here
too to be on the safe side in case this structure is expanded someday.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ef/maint-empty-commit-log' into maintJunio C Hamano Sat, 10 Apr 2010 05:38:53 +0000 (22:38 -0700)

Merge branch 'ef/maint-empty-commit-log' into maint

* ef/maint-empty-commit-log:
rev-list: fix --pretty=oneline with empty message

Merge branch 'jc/conflict-marker-size' into maintJunio C Hamano Sat, 10 Apr 2010 05:38:34 +0000 (22:38 -0700)

Merge branch 'jc/conflict-marker-size' into maint

* jc/conflict-marker-size:
diff --check: honor conflict-marker-size attribute

Merge branch 'sp/maint-http-backend-die-triggers-die... Junio C Hamano Sat, 10 Apr 2010 05:38:16 +0000 (22:38 -0700)

Merge branch 'sp/maint-http-backend-die-triggers-die-recursively' into maint

* sp/maint-http-backend-die-triggers-die-recursively:
http-backend: Don't infinite loop during die()

Merge branch 'mg/maint-send-email-lazy-editor' into... Junio C Hamano Sat, 10 Apr 2010 05:23:04 +0000 (22:23 -0700)

Merge branch 'mg/maint-send-email-lazy-editor' into maint

* mg/maint-send-email-lazy-editor:
send-email: lazily assign editor variable

Merge branch 'rr/imap-send-unconfuse-from-line' into... Junio C Hamano Sat, 10 Apr 2010 05:22:44 +0000 (22:22 -0700)

Merge branch 'rr/imap-send-unconfuse-from-line' into maint

* rr/imap-send-unconfuse-from-line:
imap-send: Remove limitation on message body