Skip to content

Commit d7cb614

Browse files
derrickstoleedscho
authored andcommitted
sparse-checkout: mark 'clean' as experimental
Signed-off-by: Derrick Stolee <[email protected]>
1 parent 61b104b commit d7cb614

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

builtin/sparse-checkout.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "setup.h"
2121
#include "sparse-index.h"
2222
#include "worktree.h"
23+
#include "color.h"
2324

2425
static const char *empty_base = "";
2526

@@ -935,7 +936,7 @@ static int sparse_checkout_reapply(int argc, const char **argv,
935936
}
936937

937938
static char const * const builtin_sparse_checkout_clean_usage[] = {
938-
"git sparse-checkout clean [-n|--dry-run]",
939+
"(EXPERIMENTAL!) git sparse-checkout clean [-n|--dry-run]",
939940
NULL
940941
};
941942

@@ -980,6 +981,11 @@ static int sparse_checkout_clean(int argc, const char **argv,
980981
OPT_END(),
981982
};
982983

984+
if (isatty(2))
985+
color_fprintf_ln(stderr,
986+
want_color_fd(2, GIT_COLOR_AUTO) ? GIT_COLOR_YELLOW : "",
987+
"(THIS IS EXPERIMENTAL, THE CLI MAY CHANGE IN THE FUTURE!)");
988+
983989
setup_work_tree();
984990
if (!core_apply_sparse_checkout)
985991
die(_("must be in a sparse-checkout to clean directories"));

0 commit comments

Comments
 (0)