gitweb.git
Merge branch 'maint'Junio C Hamano Fri, 28 Aug 2009 05:01:01 +0000 (22:01 -0700)

Merge branch 'maint'

* maint:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view

Merge branch 'maint-1.6.3' into maintJunio C Hamano Fri, 28 Aug 2009 03:42:42 +0000 (20:42 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view

Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano Fri, 28 Aug 2009 03:42:38 +0000 (20:42 -0700)

Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
Fix overridable written with an extra 'e'
Documentation: git-archive: mark --format as optional in summary
Round-down years in "years+months" relative date view

Conflicts:
Documentation/git-archive.txt

Fix overridable written with an extra 'e'Nanako Shiraishi Fri, 28 Aug 2009 03:18:49 +0000 (12:18 +0900)

Fix overridable written with an extra 'e'

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Fri, 28 Aug 2009 03:41:37 +0000 (20:41 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
Documentation: git-archive: mark --format as optional in summary

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Fri, 28 Aug 2009 03:41:31 +0000 (20:41 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
Documentation: git-archive: mark --format as optional in summary

Documentation: git-archive: mark --format as optional... Wesley J. Landaker Fri, 28 Aug 2009 02:55:43 +0000 (20:55 -0600)

Documentation: git-archive: mark --format as optional in summary

The --format option was made optional in 8ff21b1 (git-archive: make
tar the default format, 2007-04-09), but it was not marked as optional
in the summary. This trival patch just changes the summary to match
the rest of the documentation.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.5.6' into maint-1.6.0Junio C Hamano Fri, 28 Aug 2009 03:03:35 +0000 (20:03 -0700)

Merge branch 'maint-1.5.6' into maint-1.6.0

* maint-1.5.6:
revision traversal and pack: notice and die on missing commit

Round-down years in "years+months" relative date viewDavid Reiss Thu, 27 Aug 2009 23:39:38 +0000 (16:39 -0700)

Round-down years in "years+months" relative date view

Previously, a commit from 1 year and 7 months ago would display as
"2 years, 7 months ago".

Signed-off-by: David Reiss <dreiss@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: add t9501 tests for checking HTTP status codesMark Rada Tue, 25 Aug 2009 05:03:48 +0000 (01:03 -0400)

gitweb: add t9501 tests for checking HTTP status codes

Adds a new test file, t9501, that checks HTTP status codes and messages
from gitweb.

Currently, the only tests are for the snapshot feature.

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

gitweb: split test suite into library and testsMark Rada Fri, 28 Aug 2009 02:07:07 +0000 (22:07 -0400)

gitweb: split test suite into library and tests

To accommodate additions to the test cases for gitweb, the preamble
from t9500 is now in its own library so that new sets of tests for
gitweb can use the same setup without copying the code.

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

Merge branch 'lt/block-sha1'Junio C Hamano Fri, 28 Aug 2009 00:00:35 +0000 (17:00 -0700)

Merge branch 'lt/block-sha1'

* lt/block-sha1:
remove ARM and Mozilla SHA1 implementations
block-sha1: guard gcc extensions with __GNUC__
make sure byte swapping is optimal for git
block-sha1: make the size member first in the context struct

Merge branch 'as/maint-graph-interesting-fix'Junio C Hamano Thu, 27 Aug 2009 23:59:56 +0000 (16:59 -0700)

Merge branch 'as/maint-graph-interesting-fix'

* as/maint-graph-interesting-fix:
Add tests for rev-list --graph with options that simplify history
graph API: fix bug in graph_is_interesting()

Merge branch 'jh/submodule-foreach'Junio C Hamano Thu, 27 Aug 2009 23:59:25 +0000 (16:59 -0700)

Merge branch 'jh/submodule-foreach'

* jh/submodule-foreach:
git clone: Add --recursive to automatically checkout (nested) submodules
t7407: Use 'rev-parse --short' rather than bash's substring expansion notation
git submodule status: Add --recursive to recurse into nested submodules
git submodule update: Introduce --recursive to update nested submodules
git submodule foreach: Add --recursive to recurse into nested submodules
git submodule foreach: test access to submodule name as '$name'
Add selftest for 'git submodule foreach'
git submodule: Cleanup usage string and add option parsing to cmd_foreach()
git submodule foreach: Provide access to submodule name, as '$name'

Conflicts:
Documentation/git-submodule.txt
git-submodule.sh

Merge branch 'jc/maint-unpack-objects-strict'Junio C Hamano Thu, 27 Aug 2009 23:59:08 +0000 (16:59 -0700)

Merge branch 'jc/maint-unpack-objects-strict'

* jc/maint-unpack-objects-strict:
Fix "unpack-objects --strict"

Conflicts:
builtin-unpack-objects.c

Merge branch 'wl/insta-mongoose'Junio C Hamano Thu, 27 Aug 2009 23:57:34 +0000 (16:57 -0700)

Merge branch 'wl/insta-mongoose'

* wl/insta-mongoose:
Add support for the Mongoose web server.

Merge branch 'nd/sparse' (early part)Junio C Hamano Thu, 27 Aug 2009 23:56:33 +0000 (16:56 -0700)

Merge branch 'nd/sparse' (early part)

* 'nd/sparse' (early part):
Prevent diff machinery from examining assume-unchanged entries on worktree

Make test case number uniqueJohannes Sixt Thu, 27 Aug 2009 07:38:27 +0000 (09:38 +0200)

Make test case number unique

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

Make test case number uniqueJohannes Sixt Thu, 27 Aug 2009 07:35:55 +0000 (09:35 +0200)

Make test case number unique

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

commit.c: rename variable named 'n' which masks previou... Brandon Casey Thu, 27 Aug 2009 16:16:34 +0000 (11:16 -0500)

commit.c: rename variable named 'n' which masks previous declaration

The variable named 'n' was initially declared to be of type int. The name
'n' was reused inside inner blocks as a different type. Rename the uses
within inner blocks to avoid confusion and give them a slightly more
descriptive name.

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

abspath.c: move declaration of 'len' into inner block... Brandon Casey Thu, 27 Aug 2009 16:16:33 +0000 (11:16 -0500)

abspath.c: move declaration of 'len' into inner block and use appropriate type

The 'len' variable was declared at the beginning of the make_absolute_path
function and also in an inner 'if' block which masked the outer declaration.
It is only used in two 'if' blocks, so remove the outer declaration and
make a new declaration inside the other 'if' block that uses 'len'.

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

Makefile: remove pointless conditional assignment in... Brandon Casey Thu, 27 Aug 2009 15:35:46 +0000 (10:35 -0500)

Makefile: remove pointless conditional assignment in SunOS section

It is true that NEEDS_RESOLV is needed on SunOS if NO_IPV6 is set since
hstrerror() resides in libresolv, but performing this test at its current
location is not very useful. It will only have any effect if the user
modifies the make variables from the make command line, and will have no
effect if a config.mak file is used. A better location for this
conditional would have been further down in the Makefile after the
config.mak and config.mak.autogen had been parsed. Rather than adding
clutter to the Makefile for a conditional that will likely never be
triggered, just remove it, and any user on SunOS that manually sets NO_IPV6
can also set NEEDS_RESOLV.

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

mailinfo.scissors: new configurationJunio C Hamano Thu, 27 Aug 2009 05:30:33 +0000 (22:30 -0700)

mailinfo.scissors: new configuration

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

am/mailinfo: Disable scissors processing by defaultJunio C Hamano Thu, 27 Aug 2009 04:36:05 +0000 (21:36 -0700)

am/mailinfo: Disable scissors processing by default

You can enable it by giving --scissors to "git am".

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

Documentation: describe the scissors mark support of... Nanako Shiraishi Tue, 25 Aug 2009 08:20:00 +0000 (17:20 +0900)

Documentation: describe the scissors mark support of "git am"

Describe what a scissors mark looks like, and explain in what situation
it is often used.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach mailinfo to ignore everything before -- >8 -... Junio C Hamano Sun, 23 Aug 2009 08:56:19 +0000 (01:56 -0700)

Teach mailinfo to ignore everything before -- >8 -- mark

This teaches mailinfo the scissors -- >8 -- mark; the command ignores
everything before it in the message body.

For lefties among us, we also support -- 8< -- ;-)

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

builtin-mailinfo.c: fix confusing internal API to maili... Junio C Hamano Thu, 27 Aug 2009 05:17:25 +0000 (22:17 -0700)

builtin-mailinfo.c: fix confusing internal API to mailinfo()

It fed two arguments to override the corresponding global variables,
but the caller always assigned the values to the global variables
first and then passed those global variables to this function.

Stop pretending to be a proper API to confuse people.

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

clone: add --branch option to select a different HEADJeff King Wed, 26 Aug 2009 19:05:08 +0000 (15:05 -0400)

clone: add --branch option to select a different HEAD

We currently point the HEAD of a newly cloned repo to the
same ref as the parent repo's HEAD. While a user can then
"git checkout -b foo origin/foo" whichever branch they
choose, it is more convenient and more efficient to tell
clone which branch you want in the first place.

Based on a patch by Kirill A. Korinskiy.

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

git-gui: Ensure submodule path is quoted properlyShawn O. Pearce Thu, 27 Aug 2009 00:39:45 +0000 (17:39 -0700)

git-gui: Ensure submodule path is quoted properly

When quoting an arbitrary user string in Tcl, its better to use
[list ...] than to use {...}, in case the user string has spaces
or { embedded within it.

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

git-gui: fix diff for partially staged submodule changesJens Lehmann Wed, 26 Aug 2009 20:25:15 +0000 (22:25 +0200)

git-gui: fix diff for partially staged submodule changes

When a submodule commit had already been staged and another commit had
been checked out inside the submodule, the diff always displayed the
submodule commit log messages between the last supermodule commit and
the working tree, totally ignoring the commit in the index.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Merge branch 'maint'Junio C Hamano Wed, 26 Aug 2009 19:15:15 +0000 (12:15 -0700)

Merge branch 'maint'

* maint:
git-log: allow --decorate[=short|full]
Minor improvement to the write-tree documentation
git-bisect: call the found commit "*the* first bad commit"

git-log: allow --decorate[=short|full]Lars Hjemli Sat, 15 Aug 2009 14:23:12 +0000 (16:23 +0200)

git-log: allow --decorate[=short|full]

Commit de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.

This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Minor improvement to the write-tree documentationDavid Kågedal Wed, 26 Aug 2009 14:04:54 +0000 (16:04 +0200)

Minor improvement to the write-tree documentation

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-bisect: call the found commit "*the* first bad... Nanako Shiraishi Wed, 26 Aug 2009 08:38:50 +0000 (17:38 +0900)

git-bisect: call the found commit "*the* first bad commit"

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'js/maint-cover-letter-non-ascii' into... Junio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'js/maint-cover-letter-non-ascii' into maint

* js/maint-cover-letter-non-ascii:
Correctly mark cover letters' encodings if they are not pure ASCII
Expose the has_non_ascii() function

Merge branch 'jc/maint-clean-nested-dir-safety' into... Junio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jc/maint-clean-nested-dir-safety' into maint

* jc/maint-clean-nested-dir-safety:
clean: require double -f options to nuke nested git repository and work tree

Merge branch 'jk/maint-merge-msg-fix' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jk/maint-merge-msg-fix' into maint

* jk/maint-merge-msg-fix:
merge: indicate remote tracking branches in merge message
merge: fix incorrect merge message for ambiguous tag/branch
add tests for merge message headings

Merge branch 'jc/apply-epoch-patch' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jc/apply-epoch-patch' into maint

* jc/apply-epoch-patch:
apply: notice creation/removal patches produced by GNU diff

Merge branch 'jp/symlink-dirs' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'jp/symlink-dirs' into maint

* jp/symlink-dirs:
t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite
git-checkout: be careful about untracked symlinks
lstat_cache: guard against full match of length of 'name' parameter
Demonstrate bugs when a directory is replaced with a symlink

Merge branch 'maint-1.6.3' into maintJunio C Hamano Wed, 26 Aug 2009 19:05:57 +0000 (12:05 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk

Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into... Junio C Hamano Wed, 26 Aug 2009 18:22:00 +0000 (11:22 -0700)

Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3

* tr/maint-1.6.3-add-p-modeonly-fix:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk

gitweb: improve snapshot error handlingMark Rada Tue, 25 Aug 2009 04:59:48 +0000 (00:59 -0400)

gitweb: improve snapshot error handling

The last check in the second block of checks in the &git_snapshot routine
is never executed because the second to last check is a superset of the
last check.

Switch the order of the last two checks. It has the advantage of giving
clients a more specific reason why they cannot get a snapshot format if
the format they have chosen is disabled.

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

Merge branch 'aj/fix-read-tree-from-scratch'Junio C Hamano Tue, 25 Aug 2009 21:48:15 +0000 (14:48 -0700)

Merge branch 'aj/fix-read-tree-from-scratch'

* aj/fix-read-tree-from-scratch:
read-tree: Fix regression with creation of a new index file.

Merge branch 'jc/maint-checkout-index-to-prefix'Junio C Hamano Tue, 25 Aug 2009 21:47:56 +0000 (14:47 -0700)

Merge branch 'jc/maint-checkout-index-to-prefix'

* jc/maint-checkout-index-to-prefix:
check_path(): allow symlinked directories to checkout-index --prefix

Merge branch 'jl/submodule-summary-diff-files'Junio C Hamano Tue, 25 Aug 2009 21:46:43 +0000 (14:46 -0700)

Merge branch 'jl/submodule-summary-diff-files'

* jl/submodule-summary-diff-files:
Documentaqtion/git-submodule.txt: Typofix
git submodule summary: add --files option

Merge branch 'lh/short-decorate'Junio C Hamano Tue, 25 Aug 2009 21:46:12 +0000 (14:46 -0700)

Merge branch 'lh/short-decorate'

* lh/short-decorate:
git-log: allow --decorate[=short|full]

Merge branch 'oa/stash-na'Junio C Hamano Tue, 25 Aug 2009 21:46:04 +0000 (14:46 -0700)

Merge branch 'oa/stash-na'

* oa/stash-na:
git stash: Give friendlier errors when there is nothing to apply

Documentation: consistently refer to check-ref-formatNanako Shiraishi Sat, 22 Aug 2009 00:45:18 +0000 (09:45 +0900)

Documentation: consistently refer to check-ref-format

Change the <name> placeholder to <tagname> in the SYNOPSIS section of
git-tag documentation, and describe it in the OPTIONS section in a way
similar to how documentation for git-branch does.

Add SEE ALSO section to list the other documentation pages these two pages
refer to.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout: do not imply "-f" on unborn branchesJeff King Tue, 25 Aug 2009 03:03:16 +0000 (23:03 -0400)

checkout: do not imply "-f" on unborn branches

When checkout sees that HEAD points to a non-existent ref,
it currently acts as if "-f" was given; this behavior dates
back to 5a03e7f, which enabled checkout from unborn branches
in the shell version of "git-checkout". The reasoning given
is to avoid the code path which tries to merge the tree
contents. When checkout was converted to C, this code
remained intact.

The unfortunate side effect of this strategy is that the
"force" code path will overwrite working tree and index
state that may be precious to the user. Instead of enabling
"force", this patch uses the normal "merge" codepath for an
unborn branch, but substitutes the empty tree for the "old"
commit.

This means that in the absence of an index, any files in the
working tree will be treated as untracked files, and a
checkout which would overwrite them is aborted. Similarly,
any paths in the index will be merged with an empty entry
as the base, meaning that unless the new branch's content is
identical to what's in the index, there will be a conflict
and the checkout will be aborted.

The user is then free to correct the situation or proceed
with "-f" as appropriate.

This patch also removes the "warning: you are on a branch
yet to be born" message. Its function was to warn the user
that we were enabling the "-f" option. Since we are no
longer doing that, there is no reason for the user to care
whether we are switching away from an unborn branch.

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

fix simple deepening of a repoNicolas Pitre Mon, 24 Aug 2009 04:04:09 +0000 (00:04 -0400)

fix simple deepening of a repo

If all refs sent by the remote repo during a fetch are reachable
locally, then no further conversation is performed with the remote. This
check is skipped when the --depth argument is provided to allow the
deepening of a shallow clone which corresponding remote repo has no
changed.

However, some additional filtering was added in commit c29727d5 to
remove those refs which are equal on both sides. If the remote repo has
not changed, then the list of refs to give the remote process becomes
empty and simply attempting to deepen a shallow repo always fails.

Let's stop being smart in that case and simply send the whole list over
when that condition is met. The remote will do the right thing anyways.

Test cases for this issue are also provided.

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

Add tests for rev-list --graph with options that simpli... Adam Simpkins Fri, 21 Aug 2009 18:20:34 +0000 (11:20 -0700)

Add tests for rev-list --graph with options that simplify history

These tests help make sure graph_is_interesting() is doing the right
thing.

Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/verify-pack-stat'Junio C Hamano Mon, 24 Aug 2009 00:19:19 +0000 (17:19 -0700)

Merge branch 'jc/verify-pack-stat'

* jc/verify-pack-stat:
verify-pack --stat-only: show histogram without verifying

Merge branch 'mr/gitweb-xz'Junio C Hamano Mon, 24 Aug 2009 00:19:06 +0000 (17:19 -0700)

Merge branch 'mr/gitweb-xz'

* mr/gitweb-xz:
gitweb: add support for XZ compressed snapshots
gitweb: update INSTALL regarding specific snapshot settings
gitweb: support to globally disable a snapshot format

Merge branch 'ld/p4'Junio C Hamano Mon, 24 Aug 2009 00:18:52 +0000 (17:18 -0700)

Merge branch 'ld/p4'

* ld/p4:
git-p4: stream from perforce to speed up clones

sparse checkout: inhibit empty worktreeNguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:13 +0000 (20:47 +0700)

sparse checkout: inhibit empty worktree

The way sparse checkout works, users may empty their worktree
completely, because of non-matching sparse-checkout spec, or empty
spec. I believe this is not desired. This patch makes Git refuse to
produce such worktree.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add tests for sparse checkoutNguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:12 +0000 (20:47 +0700)

Add tests for sparse checkout

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-tree: add --no-sparse-checkout to disable sparse... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:11 +0000 (20:47 +0700)

read-tree: add --no-sparse-checkout to disable sparse checkout support

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees(): ignore worktree check outside checkout... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:10 +0000 (20:47 +0700)

unpack-trees(): ignore worktree check outside checkout area

verify_absent() and verify_uptodate() are used to ensure worktree
is safe to be updated, then CE_REMOVE or CE_UPDATE will be set.
Finally check_updates() bases on CE_REMOVE, CE_UPDATE and the
recently added CE_WT_REMOVE to update working directory accordingly.

The entries that are checked may eventually be left out of checkout
area (done later in apply_sparse_checkout()). We don't want to update
outside checkout area. This patch teaches Git to assume "good",
skip these checks when it's sure those entries will be outside checkout
area, and clear CE_REMOVE|CE_UPDATE that could be set due to this
assumption.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack_trees(): apply $GIT_DIR/info/sparse-checkout... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:09 +0000 (20:47 +0700)

unpack_trees(): apply $GIT_DIR/info/sparse-checkout to the final index

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees(): "enable" sparse checkout and load ... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:08 +0000 (20:47 +0700)

unpack-trees(): "enable" sparse checkout and load $GIT_DIR/info/sparse-checkout

This patch introduces core.sparseCheckout, which will control whether
sparse checkout support is enabled in unpack_trees()

It also loads sparse-checkout file that will be used in the next patch.
I split it out so the next patch will be shorter, easier to read.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees.c: generalize verify_* functionsNguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:07 +0000 (20:47 +0700)

unpack-trees.c: generalize verify_* functions

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees(): add CE_WT_REMOVE to remove on worktree... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:06 +0000 (20:47 +0700)

unpack-trees(): add CE_WT_REMOVE to remove on worktree alone

CE_REMOVE now removes both worktree and index versions. Sparse
checkout must be able to remove worktree version while keep the
index intact when checkout area is narrowed.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Introduce "sparse checkout"Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:05 +0000 (20:47 +0700)

Introduce "sparse checkout"

With skip-worktree bit, you can manually set it to unwanted files,
then remove them: you would have the so-called sparse checkout. The
disadvantages are:

- Porcelain tools are not aware of this. Everytime you do an
operation that may update working directory, skip-worktree may be
cleared out. You have to set them again.

- You still have to remove skip-worktree'd files manually, which is
boring and ineffective.

These will be addressed in the following patches. This patch gives an
idea what is "sparse checkout" in Documentation/git-read-tree.txt.
This file is chosen instead of git-checkout.txt because it is quite
technical and user-unfriendly. I'd expect git-checkout.txt to have
something when Porcelain support is done.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: export excluded_1() and add_excludes_from_file_1()Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:04 +0000 (20:47 +0700)

dir.c: export excluded_1() and add_excludes_from_file_1()

These functions are used to handle .gitignore. They are now exported
so that sparse checkout can reuse.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

excluded_1(): support exclude files in indexNguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:03 +0000 (20:47 +0700)

excluded_1(): support exclude files in index

Index does not really have "directories", attempts to match "foo/"
against index will fail unless someone tries to reconstruct directories
from a list of file.

Observing that dtype in this function can never be NULL (otherwise
it would segfault), dtype NULL will be used to say "hey.. you are
matching against index" and behave properly.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees(): carry skip-worktree bit over in merged_... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:02 +0000 (20:47 +0700)

unpack-trees(): carry skip-worktree bit over in merged_entry()

In this code path, we would remove "old" and replace it with "merge".
"old" may have skip-worktree bit, so re-add it to "merge".

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Read .gitignore from index if it is skip-worktreeNguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:01 +0000 (20:47 +0700)

Read .gitignore from index if it is skip-worktree

This adds index as a prerequisite for directory listing (with
exclude). At the moment directory listing is used by "git clean",
"git add", "git ls-files" and "git status"/"git commit" and
unpack_trees()-related commands. These commands have been
checked/modified to populate index before doing directory listing.

add_excludes_from_file() does not enable this feature, because it
is used to read .git/info/exclude and some explicit files specified
by "git ls-files".

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Avoid writing to buffer in add_excludes_from_file_1()Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:47:00 +0000 (20:47 +0700)

Avoid writing to buffer in add_excludes_from_file_1()

In the next patch, the buffer that is being used within
add_excludes_from_file_1() comes from another function and does not
have extra space to put \n at the end.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach Git to respect skip-worktree bit (writing part)Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:46:59 +0000 (20:46 +0700)

Teach Git to respect skip-worktree bit (writing part)

This part is mainly to remove CE_VALID shortcuts (and as a
consequence, ce_uptodate() shortcuts as it may be turned on by
CE_VALID) in writing code path if skip-worktree is used. Various tests
are added to avoid future breakages.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach Git to respect skip-worktree bit (reading part)Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:46:58 +0000 (20:46 +0700)

Teach Git to respect skip-worktree bit (reading part)

grep: turn on --cached for files that is marked skip-worktree
ls-files: do not check for deleted file that is marked skip-worktree
update-index: ignore update request if it's skip-worktree, while still allows removing
diff*: skip worktree version

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Introduce "skip-worktree" bit in index, teach Git to... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:46:57 +0000 (20:46 +0700)

Introduce "skip-worktree" bit in index, teach Git to get/set this bit

Detail about this bit is in Documentation/git-update-index.txt.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add test-index-versionNguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:46:56 +0000 (20:46 +0700)

Add test-index-version

Commit 06aaaa0bf70fe37d198893f4e25fa73b6516f8a9 may step index format
version up and down, depends on whether extended flags present in the
index. This adds a test to check for index format version.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

update-index: refactor mark_valid() in preparation... Nguyễn Thái Ngọc Duy Thu, 20 Aug 2009 13:46:55 +0000 (20:46 +0700)

update-index: refactor mark_valid() in preparation for new options

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add support for the Mongoose web server.Wilhansen Li Fri, 21 Aug 2009 14:24:48 +0000 (22:24 +0800)

Add support for the Mongoose web server.

Mongoose (http://code.google.com/p/mongoose/) is a lightweight web
server. It's just a single binary so it's a lot simpler to configure and
install.

Signed-off-by: Wilhansen Li <wil@nohakostudios.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: pull ref markes pull out of subject <a> elementGiuseppe Bilotta Sun, 23 Aug 2009 08:28:09 +0000 (10:28 +0200)

gitweb: pull ref markes pull out of subject <a> element

Since 4afbaef (gitweb: ref markers link to named shortlogs, 2008-09-02),
ref markers that accompany the subject in views such as shortlog and
history point to something different from the subject itself. Therefore,
they should not be included in the same <a> element.

Benefits of the change are:

* better compliance to the XHTML standards, that forbid links within
links even though the restriction cannot be imposed via DTD; this also
benefits visualization in some older browsers;

* when hovering the subject, only the subject itself is underlined; when
hovering the ref markers, only the text in the hovered ref marker is
underlined; previously, hovering any written part of the subject column
led to complete underlying of everything at the same time, with
unpleasing effects.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

xutils: Fix xdl_recmatch() on incomplete linesJunio C Hamano Sun, 23 Aug 2009 07:57:18 +0000 (00:57 -0700)

xutils: Fix xdl_recmatch() on incomplete lines

Thell Fowler noticed that various "ignore whitespace" options to git diff
do not work well on an incomplete line.

The loop control of the function responsible for these bugs was extremely
difficult to follow. This patch restructures the loops for three variants
of "ignore whitespace" logic.

The basic idea of the re-written logic is:

- A loop runs while the characters from both strings we are looking at
match. We declare unmatch immediately when we find something that does
not match and return false from the function. We break out of the loop
if we ran out of either side of the string.

The way we skip spaces inside this loop varies depending on the style
of ignoring whitespaces.

- After the above loop breaks, we know that the parts of the strings we
inspected so far match, ignoring the whitespaces. The lines can match
only if the remainder consists of nothing but whitespaces. This part
of the logic is shared across all three styles.

The new code is more obvious and should be much easier to follow.

Tested-by: Thell Fowler <git@tbfowler.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

xutils: Fix hashing an incomplete line with whitespaces... Junio C Hamano Sun, 23 Aug 2009 07:51:09 +0000 (00:51 -0700)

xutils: Fix hashing an incomplete line with whitespaces at the end

Upon seeing a whitespace, xdl_hash_record_with_whitespace() first skipped
the run of whitespaces (excluding LF) that begins there, ensuring that the
pointer points at the last whitespace character in the run, and assumed
that the next character must be LF at the end of the line. This does not
work when hashing an incomplete line, which lacks the LF at the end.

Introduce "at_eol" variable that is true when either we are at the end of
line (looking at LF) or at the end of an incomplete line, and use that
instead throughout the code.

Noticed by Thell Fowler.

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

Further 'approxidate' improvementsLinus Torvalds Sun, 23 Aug 2009 01:11:44 +0000 (18:11 -0700)

Further 'approxidate' improvements

The previous patch to improve approxidate got us to the point that a lot
of the remaining annoyances were due to the 'strict' date handling running
first, and deciding that it got a good enough date that the approximate
date routines were never even invoked.

For example, using a date string like

6AM, June 7, 2009

the strict date logic would be perfectly happy with the "June 7, 2009"
part, and ignore the 6AM part that it didn't understand - resulting in the
information getting dropped on the floor:

6AM, June 7, 2009 -> Sat Jun 6 00:00:00 2009

and the date being calculated as if it was midnight, and the '6AM' having
confused the date routines into thinking about '6 June' rather than 'June
7' at 6AM (ie notice how the _day_ was wrong due to this, not just the
time).

So this makes the strict date routines a bit stricter, and requires that
not just the date, but also the time, has actually been parsed. With that
fix, and trivial extension of the approxidate routines, git now properly
parses the date as

6AM, June 7, 2009 -> Sun Jun 7 06:00:00 2009

without dropping the fuzzy time ("6AM" or "noon" or any of the other
non-strict time formats) on the floor.

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

Improve on 'approxidate'Linus Torvalds Sat, 22 Aug 2009 22:10:07 +0000 (15:10 -0700)

Improve on 'approxidate'

This is not a new failure mode - approxidate has always been kind of
random in the input it accepts, but some of the randomness is more
irritating than others.

For example:

Jun 6, 5AM -> Mon Jun 22 05:00:00 2009
5AM Jun 6 -> Sat Jun 6 05:00:00 2009

Whaa? The reason for the above is that approxidate squirrells away the '6'
from "Jun 6" to see if it's going to be a relative number, and then
forgets about it when it sees a new number (the '5' in '5AM'). So the odd
"June 22" date is because today is July 22nd, and if it doesn't have
another day of the month, it will just pick todays mday - having ignored
the '6' entirely due to getting all excited about seeing a new number (5).

There are other oddnesses. This does not fix them all, but I think it
makes for fewer _really_ perplexing cases. At least now we have

Jun 6, 5AM -> Sat Jun 6 05:00:00 2009
5AM, Jun 6 -> Sat Jun 6 05:00:00 2009

which makes me happier. I can still point to cases that don't work as
well, but those are separate issues.

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

send-email: make --no-chain-reply-to the defaultJunio C Hamano Sat, 22 Aug 2009 19:48:48 +0000 (12:48 -0700)

send-email: make --no-chain-reply-to the default

In http://article.gmane.org/gmane.comp.version-control.git/109790 I
threatened to announce a change to the default threading style used by
send-email to no-chain-reply-to (i.e. the second and subsequent messages
will all be replies to the first one), unless nobody objected, in 1.6.3.

Nobody objected, as far as I can dig the list archive. But when nothing
happened in 1.6.3 nor 1.6.4, nobody from the camp who complained loudly
that led to the message did not complain either.

So I am guessing that after all nobody cares about this. But 1.7.0 is a
good time to change this, and as I said in the message, I personally think
it is a good change, so here it is.

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

git status: not "commit --dry-run" anymoreJunio C Hamano Sat, 15 Aug 2009 09:27:39 +0000 (02:27 -0700)

git status: not "commit --dry-run" anymore

This removes tentative "git stat" and make it take over "git status".

There are some tests that expect "git status" to exit with non-zero status
when there is something staged. Some tests expect "git status path..." to
show the status for a partial commit.

For these, replace "git status" with "git commit --dry-run". For the
ones that do not attempt a dry-run of a partial commit that check the
output from the command, check the output from "git status" as well, as
they should be identical.

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

git stat -s: short status outputJunio C Hamano Wed, 5 Aug 2009 06:55:22 +0000 (23:55 -0700)

git stat -s: short status output

Give -s(hort) option to "git stat" that shows the status of paths in a
more concise way.

XY PATH1 -> PATH2

format to be more machine readable than output from "git status", which is
about previewing of "git commit" with the same arguments.

PATH1 is the path in the HEAD, and " -> PATH2" part is shown only when
PATH1 corresponds to a different path in the index/worktree.

For unmerged entries, X shows the status of stage #2 (i.e. ours) and Y
shows the status of stage #3 (i.e. theirs). For entries that do not have
conflicts, X shows the status of the index, and Y shows the status of the
work tree. For untracked paths, XY are "??".

X Y Meaning
-------------------------------------------------
[MD] not updated
M [ MD] updated in index
A [ MD] added to index
D [ MD] deleted from index
R [ MD] renamed in index
C [ MD] copied in index
[MARC] index and work tree matches
[ MARC] M work tree changed since index
[ MARC] D deleted in work tree

D D unmerged, both deleted
A U unmerged, added by us
U D unmerged, deleted by them
U A unmerged, added by them
D U unmerged, deleted by us
A A unmerged, both added
U U unmerged, both modified

? ? untracked

When given -z option, the records are terminated by NUL characters for
better machine readability. Because the traditional long format is
designed for human consumption, NUL termination does not make sense.
For this reason, -z option implies -s (short output).

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

git stat: the beginning of "status that is not a dry... Junio C Hamano Sat, 8 Aug 2009 06:31:57 +0000 (23:31 -0700)

git stat: the beginning of "status that is not a dry-run of commit"

Tentatively add "git stat" as a new command.

This is not "preview of commit with the same arguments"; the path parameters
are not paths to be added to the pristine index (aka "--only" option), but
are taken as pathspecs to limit the output. Later in 1.7.0 release, it will
take over "git status".

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

reset: make the reminder output consistent with "checkout"Matthieu Moy Fri, 21 Aug 2009 08:57:59 +0000 (10:57 +0200)

reset: make the reminder output consistent with "checkout"

git reset without argument displays a summary of the local modification,
like this:

$ git reset
Makefile: locally modified

Some people have problems with this; they look like an error message.

This patch makes its output mimic how "git checkout $another_branch"
reports the paths with local modifications. "git add --refresh --verbose"
is changed in the same way.

It also adds a header to make it clear that the output is informative,
and not an error.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>

Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.Matthieu Moy Fri, 21 Aug 2009 08:57:58 +0000 (10:57 +0200)

Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.

The change in the output is going to become more general than just saying
"changed", so let's make the variable name more general too.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.6.4.1Junio C Hamano Sat, 22 Aug 2009 03:23:10 +0000 (20:23 -0700)

Sync with 1.6.4.1

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

GIT 1.6.4.1 v1.6.4.1Junio C Hamano Fri, 21 Aug 2009 19:02:25 +0000 (12:02 -0700)

GIT 1.6.4.1

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

Merge branch 'bc/maint-am-email' into maintJunio C Hamano Sat, 22 Aug 2009 01:51:30 +0000 (18:51 -0700)

Merge branch 'bc/maint-am-email' into maint

* bc/maint-am-email:
git-am: print fair error message when format detection fails
am: allow individual e-mail files as input

compat/snprintf.c: clarify SNPRINTF_SIZE_CORRJunio C Hamano Fri, 21 Aug 2009 22:13:21 +0000 (15:13 -0700)

compat/snprintf.c: clarify SNPRINTF_SIZE_CORR

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

Merge branch 'cc/replace'Junio C Hamano Sat, 22 Aug 2009 01:47:53 +0000 (18:47 -0700)

Merge branch 'cc/replace'

* cc/replace:
t6050: check pushing something based on a replaced commit
Documentation: add documentation for "git replace"
Add git-replace to .gitignore
builtin-replace: use "usage_msg_opt" to give better error messages
parse-options: add new function "usage_msg_opt"
builtin-replace: teach "git replace" to actually replace
Add new "git replace" command
environment: add global variable to disable replacement
mktag: call "check_sha1_signature" with the replacement sha1
replace_object: add a test case
object: call "check_sha1_signature" with the replacement sha1
sha1_file: add a "read_sha1_file_repl" function
replace_object: add mechanism to replace objects found in "refs/replace/"
refs: add a "for_each_replace_ref" function

Merge branch 'gb/apply-ignore-whitespace'Junio C Hamano Sat, 22 Aug 2009 01:47:48 +0000 (18:47 -0700)

Merge branch 'gb/apply-ignore-whitespace'

* gb/apply-ignore-whitespace:
git apply: option to ignore whitespace differences

Merge branch 'bc/mailsplit-cr-at-eol'Junio C Hamano Sat, 22 Aug 2009 01:47:44 +0000 (18:47 -0700)

Merge branch 'bc/mailsplit-cr-at-eol'

* bc/mailsplit-cr-at-eol:
Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings
builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used
builtin-mailinfo,builtin-mailsplit: use strbufs
strbuf: add new function strbuf_getwholeline()

graph API: fix bug in graph_is_interesting()Adam Simpkins Wed, 19 Aug 2009 02:34:33 +0000 (19:34 -0700)

graph API: fix bug in graph_is_interesting()

Previously, graph_is_interesting() did not behave quite the same way as
the code in get_revision(). As a result, it would sometimes think
commits were uninteresting, even though get_revision() would return
them. This resulted in incorrect lines in the graph output.

This change creates a get_commit_action() function, which
graph_is_interesting() and simplify_commit() both now use to determine
if a commit will be shown. It is identical to the old simplify_commit()
behavior, except that it never calls rewrite_parents().

This problem was reported by Santi Béjar. The following command
would exhibit the problem before, but now works correctly:

git log --graph --simplify-by-decoration --oneline v1.6.3.3

Previously git graph did not display the output for this command
correctly between f29ac4f and 66996ec, among other places.

Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/maint-merge-recursive-fix' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:24 +0000 (11:34 -0700)

Merge branch 'jc/maint-merge-recursive-fix' into maint

* jc/maint-merge-recursive-fix:
merge-recursive: don't segfault while handling rename clashes

Merge branch 'zf/maint-gitweb-acname' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:17 +0000 (11:34 -0700)

Merge branch 'zf/maint-gitweb-acname' into maint

* zf/maint-gitweb-acname:
gitweb: parse_commit_text encoding fix

Merge branch 'np/maint-limit-delta-cache' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:02 +0000 (11:34 -0700)

Merge branch 'np/maint-limit-delta-cache' into maint

* np/maint-limit-delta-cache:
don't let the delta cache grow unbounded in 'git repack'

Merge branch 'jk/maint-show-tag' into maintJunio C Hamano Fri, 21 Aug 2009 18:33:54 +0000 (11:33 -0700)

Merge branch 'jk/maint-show-tag' into maint

* jk/maint-show-tag:
show: add space between multiple items
show: suppress extra newline when showing annotated tag

Merge branch 'sb/maint-pull-rebase' into maintJunio C Hamano Fri, 21 Aug 2009 18:33:08 +0000 (11:33 -0700)

Merge branch 'sb/maint-pull-rebase' into maint

* sb/maint-pull-rebase:
pull: support rebased upstream + fetch + pull --rebase
t5520-pull: Test for rebased upstream + fetch + pull --rebase

Make test number t7406- uniqueJohannes Sixt Fri, 21 Aug 2009 08:32:25 +0000 (10:32 +0200)

Make test number t7406- unique

We skip t7407 because a patch series is cooking that uses is.

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

git clone: Add --recursive to automatically checkout... Johan Herland Wed, 19 Aug 2009 23:07:43 +0000 (01:07 +0200)

git clone: Add --recursive to automatically checkout (nested) submodules

Many projects using submodules expect all submodules to be checked out
in order to build/work correctly. A common command sequence for
developers on such projects is:

git clone url/to/project
cd project
git submodule update --init (--recursive)

This patch introduces the --recursive option to git-clone. The new
option causes git-clone to recursively clone and checkout all
submodules of the cloned project. Hence, the above command sequence
can be reduced to:

git clone --recursive url/to/project

--recursive is ignored if no checkout is done by the git-clone.

The patch also includes documentation and a selftest.

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