From: Nguyễn Thái Ngọc Duy Date: Thu, 20 Aug 2009 13:47:11 +0000 (+0700) Subject: read-tree: add --no-sparse-checkout to disable sparse checkout support X-Git-Tag: v1.7.0-rc0~103^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a5d07d0f5c838acb2c9d69a19907c50f72848b3b;p=git.git read-tree: add --no-sparse-checkout to disable sparse checkout support Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt index fc3f08b81..ea7b0b2f5 100644 --- a/Documentation/git-read-tree.txt +++ b/Documentation/git-read-tree.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- 'git read-tree' [[-m [--trivial] [--aggressive] | --reset | --prefix=] [-u [--exclude-per-directory=] | -i]] - [--index-output=] + [--index-output=] [--no-sparse-checkout] [ []] @@ -110,6 +110,10 @@ OPTIONS directories the index file and index output file are located in. +--no-sparse-checkout:: + Disable sparse checkout support even if `core.sparseCheckout` + is true. + :: The id of the tree object(s) to be read/merged. diff --git a/builtin-read-tree.c b/builtin-read-tree.c index 9c2d634d6..f5acb1aa9 100644 --- a/builtin-read-tree.c +++ b/builtin-read-tree.c @@ -31,7 +31,7 @@ static int list_tree(unsigned char *sha1) } static const char * const read_tree_usage[] = { - "git read-tree [[-m [--trivial] [--aggressive] | --reset | --prefix=] [-u [--exclude-per-directory=] | -i]] [--index-output=] [ []]", + "git read-tree [[-m [--trivial] [--aggressive] | --reset | --prefix=] [-u [--exclude-per-directory=] | -i]] [--no-sparse-checkout] [--index-output=] [ []]", NULL }; @@ -98,6 +98,8 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix) PARSE_OPT_NONEG, exclude_per_directory_cb }, OPT_SET_INT('i', NULL, &opts.index_only, "don't check the working tree after merging", 1), + OPT_SET_INT(0, "no-sparse-checkout", &opts.skip_sparse_checkout, + "skip applying sparse checkout filter", 1), OPT_END() };