Re: [PATCH 10/10] clean: support cleaning sparse checkout with -S
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 15, 2010, 21:30 UTC
- Message-ID
- <20101115213059.GJ16385@burratino>
- In-Reply-To
- <1289817410-32470-11-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
> Files > that match the index exactly will be cleaned without "-f".
Hmm, that's new. Seems fine, though; a person using -S would be forwarned.
Show 8 quoted lines
> --- a/Documentation/git-clean.txt > +++ b/Documentation/git-clean.txt > @@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree > SYNOPSIS > -------- > [verse] > -'git clean' [-d] [-f] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>... > +'git clean' [-d] [-f] [-n] [-q] [-e <pattern>] [-x | -X | -S] [--] <path>...
So -S and -x don't combine?
Show 11 quoted lines
> > DESCRIPTION > ----------- > @@ -61,6 +61,10 @@ OPTIONS > Remove only files ignored by git. This may be useful to rebuild > everything from scratch, but keep manually created files. > > +-S:: > + Remove files tracked by git but are outside of sparse checkout. > + Files that match the index exactly will be removed even when > + '-f' is not given and clean.requireForce is no.
Does "no" mean "yes" here?
Probably worth mentioning that -S does not apply here.
Would it be worth adding a -s/--clean-full-worktree option to complete the analogy to -X?
> --- a/builtin/clean.c > +++ b/builtin/clean.c
Not reading the code or tests because I'm trusting that I wouldn't need to use this command. :)
Thanks, sparse checkout is looking sane now.