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>
Nguyễn Thái Ngọc Duy committed
Aug 20, 2009 at 20:47 UTC
a5d07d0f5c838acb2c9d69a19907c50f72848b3b
2 files changed
+8
-2
Documentation/git-read-tree.txt
+5
-1
@@ -10,7 +10,7 @@ SYNOPSIS
10
--------
11
'git read-tree' [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>]
12
[-u [--exclude-per-directory=<gitignore>] | -i]]
13
- [--index-output=<file>]
13
+ [--index-output=<file>] [--no-sparse-checkout]
14
<tree-ish1> [<tree-ish2> [<tree-ish3>]]
15
16
@@ -110,6 +110,10 @@ OPTIONS
110
directories the index file and index output file are
111
located in.
112
113
+--no-sparse-checkout::
114
+ Disable sparse checkout support even if `core.sparseCheckout`
115
+ is true.
116
+
117
<tree-ish#>::
118
The id of the tree object(s) to be read/merged.
119
builtin-read-tree.c
+3
-1
@@ -31,7 +31,7 @@ static int list_tree(unsigned char *sha1)
31
}
32
33
static const char * const read_tree_usage[] = {
34
- "git read-tree [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u [--exclude-per-directory=<gitignore>] | -i]] [--index-output=<file>] <tree-ish1> [<tree-ish2> [<tree-ish3>]]",
34
+ "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>]]",
35
NULL
36
};
37
@@ -98,6 +98,8 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
98
PARSE_OPT_NONEG, exclude_per_directory_cb },
99
OPT_SET_INT('i', NULL, &opts.index_only,
100
"don't check the working tree after merging", 1),
101
+ OPT_SET_INT(0, "no-sparse-checkout", &opts.skip_sparse_checkout,
102
+ "skip applying sparse checkout filter", 1),
103
OPT_END()
104
};
105