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>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2009-08-20 20:47:11 +07:00 коммит произвёл Junio C Hamano
Родитель f1f523eae9
Коммит a5d07d0f5c
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -10,7 +10,7 @@ SYNOPSIS
-------- --------
'git read-tree' [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] 'git read-tree' [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>]
[-u [--exclude-per-directory=<gitignore>] | -i]] [-u [--exclude-per-directory=<gitignore>] | -i]]
[--index-output=<file>] [--index-output=<file>] [--no-sparse-checkout]
<tree-ish1> [<tree-ish2> [<tree-ish3>]] <tree-ish1> [<tree-ish2> [<tree-ish3>]]
@ -110,6 +110,10 @@ OPTIONS
directories the index file and index output file are directories the index file and index output file are
located in. located in.
--no-sparse-checkout::
Disable sparse checkout support even if `core.sparseCheckout`
is true.
<tree-ish#>:: <tree-ish#>::
The id of the tree object(s) to be read/merged. The id of the tree object(s) to be read/merged.

Просмотреть файл

@ -31,7 +31,7 @@ static int list_tree(unsigned char *sha1)
} }
static const char * const read_tree_usage[] = { static const char * const read_tree_usage[] = {
"git read-tree [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u [--exclude-per-directory=<gitignore>] | -i]] [--index-output=<file>] <tree-ish1> [<tree-ish2> [<tree-ish3>]]", "git read-tree [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u [--exclude-per-directory=<gitignore>] | -i]] [--no-sparse-checkout] [--index-output=<file>] <tree-ish1> [<tree-ish2> [<tree-ish3>]]",
NULL 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 }, PARSE_OPT_NONEG, exclude_per_directory_cb },
OPT_SET_INT('i', NULL, &opts.index_only, OPT_SET_INT('i', NULL, &opts.index_only,
"don't check the working tree after merging", 1), "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() OPT_END()
}; };