Skip to content

Commit 553d4ad

Browse files
committed
Revert v5 of ds/sparse-cone
1 parent 20e7bd3 commit 553d4ad

20 files changed

+48
-1309
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@
158158
/git-show-branch
159159
/git-show-index
160160
/git-show-ref
161-
/git-sparse-checkout
162161
/git-stage
163162
/git-stash
164163
/git-status

Documentation/config/core.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -593,14 +593,8 @@ core.multiPackIndex::
593593
multi-pack-index design document].
594594

595595
core.sparseCheckout::
596-
Enable "sparse checkout" feature. See linkgit:git-sparse-checkout[1]
597-
for more information.
598-
599-
core.sparseCheckoutCone::
600-
Enables the "cone mode" of the sparse checkout feature. When the
601-
sparse-checkout file contains a limited set of patterns, then this
602-
mode provides significant performance advantages. See
603-
linkgit:git-sparse-checkout[1] for more information.
596+
Enable "sparse checkout" feature. See section "Sparse checkout" in
597+
linkgit:git-read-tree[1] for more information.
604598

605599
core.abbrev::
606600
Set the length object names are abbreviated to. If

Documentation/git-clone.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SYNOPSIS
1515
[--dissociate] [--separate-git-dir <git dir>]
1616
[--depth <depth>] [--[no-]single-branch] [--no-tags]
1717
[--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
18-
[--[no-]remote-submodules] [--jobs <n>] [--sparse] [--] <repository>
18+
[--[no-]remote-submodules] [--jobs <n>] [--] <repository>
1919
[<directory>]
2020

2121
DESCRIPTION
@@ -156,12 +156,6 @@ objects from the source repository into a pack in the cloned repository.
156156
used, neither remote-tracking branches nor the related
157157
configuration variables are created.
158158

159-
--sparse::
160-
Initialize the sparse-checkout file so the working
161-
directory starts with only the files in the root
162-
of the repository. The sparse-checkout file can be
163-
modified to grow the working directory as needed.
164-
165159
--mirror::
166160
Set up a mirror of the source repository. This implies `--bare`.
167161
Compared to `--bare`, `--mirror` not only maps local branches of the

Documentation/git-read-tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ support.
436436
SEE ALSO
437437
--------
438438
linkgit:git-write-tree[1]; linkgit:git-ls-files[1];
439-
linkgit:gitignore[5]; linkgit:git-sparse-checkout[1];
439+
linkgit:gitignore[5]
440440

441441
GIT
442442
---

Documentation/git-sparse-checkout.txt

Lines changed: 0 additions & 153 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,6 @@ BUILTIN_OBJS += builtin/shortlog.o
11251125
BUILTIN_OBJS += builtin/show-branch.o
11261126
BUILTIN_OBJS += builtin/show-index.o
11271127
BUILTIN_OBJS += builtin/show-ref.o
1128-
BUILTIN_OBJS += builtin/sparse-checkout.o
11291128
BUILTIN_OBJS += builtin/stash.o
11301129
BUILTIN_OBJS += builtin/stripspace.o
11311130
BUILTIN_OBJS += builtin/submodule--helper.o

builtin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix);
225225
int cmd_show(int argc, const char **argv, const char *prefix);
226226
int cmd_show_branch(int argc, const char **argv, const char *prefix);
227227
int cmd_show_index(int argc, const char **argv, const char *prefix);
228-
int cmd_sparse_checkout(int argc, const char **argv, const char *prefix);
229228
int cmd_status(int argc, const char **argv, const char *prefix);
230229
int cmd_stash(int argc, const char **argv, const char *prefix);
231230
int cmd_stripspace(int argc, const char **argv, const char *prefix);

builtin/clone.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ static const char *real_git_dir;
5959
static char *option_upload_pack = "git-upload-pack";
6060
static int option_verbosity;
6161
static int option_progress = -1;
62-
static int option_sparse_checkout;
6362
static enum transport_family family;
6463
static struct string_list option_config = STRING_LIST_INIT_NODUP;
6564
static struct string_list option_required_reference = STRING_LIST_INIT_NODUP;
@@ -147,8 +146,6 @@ static struct option builtin_clone_options[] = {
147146
OPT_PARSE_LIST_OBJECTS_FILTER(&filter_options),
148147
OPT_BOOL(0, "remote-submodules", &option_remote_submodules,
149148
N_("any cloned submodules will use their remote-tracking branch")),
150-
OPT_BOOL(0, "sparse", &option_sparse_checkout,
151-
N_("initialize sparse-checkout file to include only files at root")),
152149
OPT_END()
153150
};
154151

@@ -736,27 +733,6 @@ static void update_head(const struct ref *our, const struct ref *remote,
736733
}
737734
}
738735

739-
static int git_sparse_checkout_init(const char *repo)
740-
{
741-
struct argv_array argv = ARGV_ARRAY_INIT;
742-
int result = 0;
743-
argv_array_pushl(&argv, "-C", repo, "sparse-checkout", "init", NULL);
744-
745-
/*
746-
* We must apply the setting in the current process
747-
* for the later checkout to use the sparse-checkout file.
748-
*/
749-
core_apply_sparse_checkout = 1;
750-
751-
if (run_command_v_opt(argv.argv, RUN_GIT_CMD)) {
752-
error(_("failed to initialize sparse-checkout"));
753-
result = 1;
754-
}
755-
756-
argv_array_clear(&argv);
757-
return result;
758-
}
759-
760736
static int checkout(int submodule_progress)
761737
{
762738
struct object_id oid;
@@ -1130,9 +1106,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
11301106
if (option_required_reference.nr || option_optional_reference.nr)
11311107
setup_reference();
11321108

1133-
if (option_sparse_checkout && git_sparse_checkout_init(repo))
1134-
return 1;
1135-
11361109
remote = remote_get(option_origin);
11371110

11381111
strbuf_addf(&default_refspec, "+%s*:%s*", src_ref_prefix,

builtin/read-tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix)
162162
opts.head_idx = -1;
163163
opts.src_index = &the_index;
164164
opts.dst_index = &the_index;
165-
opts.verbose_update = isatty(2);
166165

167166
git_config(git_read_tree_config, NULL);
168167

@@ -186,7 +185,7 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix)
186185

187186
if (opts.reset || opts.merge || opts.prefix) {
188187
if (read_cache_unmerged() && (opts.prefix || opts.merge))
189-
die(_("You need to resolve your current index first"));
188+
die("You need to resolve your current index first");
190189
stage = opts.merge = 1;
191190
}
192191
resolve_undo_clear();

0 commit comments

Comments
 (0)