Re: [PATCH v2 00/14] Sparse checkout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/21/08, Jakub Narebski <jnareb@xxxxxxxxx> 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 <pattern>") 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=<patterns> [1]
git checkout --set-sparse=<patterns>
git checkout --include-sparse=<patterns>
git checkout --exclude-sparse=<patterns> [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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux