From: Junio C Hamano Date: Wed, 12 Aug 2009 06:33:06 GMT Subject: Re: [RFC PATCH v3 8/8] --sparse for porcelains Message-ID: <7v3a7xa6e5.fsf@alter.siamese.dyndns.org> In-Reply-To: <1250005446-12047-9-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > @@ -594,6 +596,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) > OPT_BOOLEAN('m', "merge", &opts.merge, "merge"), > OPT_STRING(0, "conflict", &conflict_style, "style", > "conflict style (merge or diff3)"), > + OPT_SET_INT(0, "sparse", &opts.apply_sparse, > + "apply sparse checkout filter", 1), Shouldn't this be BOOLEAN not INT, i.e. "--[no-]sparse"? That way, you could enable it by simply the presense of $GIT_DIR/info/sparse. It could also require core.sparseworktree configuration set to true if we are really paranoid, but without the actual sparse specification file flipping that configuration to true would not be useful anyway, so in practice, giving --sparse-work-tree option to these Porcelain commands would be no-op, but --no-sparse-work-tree option would be useful to ignore $GIT_DIR/info/sparse and populate the work tree fully. Or am I missing something?