Re: [PATCH 10/10] clean: support cleaning sparse checkout with -S
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Nov 16, 2010, 02:53 UTC
- Message-ID
- <AANLkTimrm2ArRn9Ym271iFEv2bstPPD0WPuP0=Majf0K@mail.gmail.com>
- In-Reply-To
- <20101115213059.GJ16385@burratino>
2010/11/16 Jonathan Nieder <jrnieder@gmail.com>:
Show 7 quoted lines
> 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?
Show 10 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?
No. Technical difficulties. Wait, nothing prevents me from doing that. Yes combination is possible.
Show 13 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, need to look at the that config variable again :(
-- Duy