Re: 2.34 regression (and workaround): deleting untracked files both outside *and inside* desired sparsity cone

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

 



On 12/1/2021 6:40 PM, Elijah Newren wrote:
> On Wed, Dec 1, 2021 at 11:19 AM Derrick Stolee <stolee@xxxxxxxxx> wrote:
>>
>> We would want to be careful now that
>> "--option" could be interpreted as a path to recommend using
>>
>>   git sparse-checkout set <options> -- <path1> ... <pathN>
> 
> Makes sense.  However, wasn't this already an issue when you added
> `--stdin` as an option for the `set` command?

You are right. This should already be handled in a sane way.
 
>> While you are here, I would be interested in making 'git clone
>> --sparse' default to cone mode. Or, should it be 'git clone
>> --sparse=cone' or something? Not making it default to cone mode
>> is a big regret of mine.
> 
> I agree it'd be much nicer to have it default to cone mode, and the
> big warning in git-sparse-checkout.txt might permit us to do so.  A
> few related questions:
> 
> * Should we document how to change from cone mode to non-cone mode?
> We have --sparse-index, --no-sparse-index, and --cone flags, but no
> --no-cone one.  Should we?  (Do these flags belong somewhere other
> than `init` since it's toggling some other flag while already using a
> sparse-checkout?)

--no-cone exists, it probably just isn't in the docs. Our 'init'
options are defined as follows:

	static struct option builtin_sparse_checkout_init_options[] = {
		OPT_BOOL(0, "cone", &init_opts.cone_mode,
			 N_("initialize the sparse-checkout in cone mode")),
		OPT_BOOL(0, "sparse-index", &init_opts.sparse_index,
			 N_("toggle the use of a sparse index")),
		OPT_END(),
	};


so --no-cone exists the same way --no-sparse-index does.

> * Should we clean up the wording in clone's --sparse option?  In particular:
> 
> --sparse::
> Initialize the sparse-checkout file so the working
> directory starts with only the files in the root
> of the repository. The sparse-checkout file can be
> modified to grow the working directory as needed.
> 
> This wording seems to suggest direct editing of
> .git/info/sparse-checkout, and might confuse users.  Perhaps the last
> sentence could change "sparse-checkout file can be modified" ->
> "sparse-checkout command can be used" or something like that?

This is probably just too old. It could use updates to link to
git-sparse-checkout.

Thanks,
-Stolee



[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