From: Nguyen Thai Ngoc Duy Date: Tue, 16 Nov 2010 02:53:47 GMT Subject: Re: [PATCH 10/10] clean: support cleaning sparse checkout with -S Message-ID: In-Reply-To: <20101115213059.GJ16385@burratino> 2010/11/16 Jonathan Nieder : > 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. It's safe, which is why I let it do that without '-f'. One can always checkout those entries again (provided that they know what entries to checkout). How do you want them to be warned? >> --- 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 ] [-x | -X] [--] ... >> +'git clean' [-d] [-f] [-n] [-q] [-e ] [-x | -X | -S] [--] ... > > So -S and -x don't combine? No. Technical difficulties. Wait, nothing prevents me from doing that. Yes combination is possible. >> >>  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, need to look at the that config variable again :( -- Duy