From: Nguyen Thai Ngoc Duy Date: Sat, 20 Sep 2008 19:48:44 GMT Subject: Re: [PATCH v2 00/14] Sparse checkout Message-ID: In-Reply-To: <200809202001.28383.jnareb@gmail.com> On 9/21/08, Jakub Narebski wrote: > > "--reset-path", I think, is a better name though. It would express the > > relation compared to --add-path and --remove-path. > > > I don't like very much '--reset-path' option name, because it is not > about 'reset' or 'resetting', but about limiting checkout to specified > paths. Unfortunately --include / --exclude looks like are for ignoring > files, not marking files with "no-checkout" bit etc. > > But I am not native English speaker. > > Further proposals: --only ("git checkout --only ") with > --checkout-only as counterpart in git-clone; --limit-to, --sparse. > > > GNU tar uses --exclude and --exclude-file (with --no-recurse, > --no-wildcards, --no-wildcards-match-slash). wget uses --accept > and --reject for filename patterns, and --include / --exclude for > directories. Neither looks right for sparse checkout in Git. I think --exclude and --include are quite good. With Junio's suggestion "foo-X", how about this? git clone --sparse-checkout= [1] git checkout --set-sparse= git checkout --include-sparse= git checkout --exclude-sparse= [2] [1] "checkout" is there to avoid being interpreted as "sparse clone" [2] --narrow-sparse IMO does not tell how the following patterns are used (is it the set that will be excluded or the target set?), "exclude" does better. > >> BTW I think that the same rules are used in gitattributes, aren't > >> they? > > > > They have different implementations. Though the rules may be the same. > > > Were you able to reuse either one? No. .gitignore is tied to read_directory() while .gitattributes has attributes attached. So I rolled out another one for index. -- Duy