git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: Victoria Dye <vdye@github.com>,
	Lessley Dennington <lessleydennington@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: 2.34 regression (and workaround): deleting untracked files both outside *and inside* desired sparsity cone
Date: Wed, 1 Dec 2021 19:41:40 -0500	[thread overview]
Message-ID: <d981adbf-7f6a-32f8-2d3e-8af5c36a6f8f@gmail.com> (raw)
In-Reply-To: <CABPp-BHSPQMUw8a6E7Kz+7L6NuD8c9GrHdTMf_rBzQR+2VGs-Q@mail.gmail.com>

On 12/1/2021 6:40 PM, Elijah Newren wrote:
> On Wed, Dec 1, 2021 at 11:19 AM Derrick Stolee <stolee@gmail.com> 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

      reply	other threads:[~2021-12-02  0:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 17:16 2.34 regression (and workaround): deleting untracked files both outside *and inside* desired sparsity cone Elijah Newren
2021-12-01 19:19 ` Derrick Stolee
2021-12-01 23:40   ` Elijah Newren
2021-12-02  0:41     ` Derrick Stolee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d981adbf-7f6a-32f8-2d3e-8af5c36a6f8f@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lessleydennington@gmail.com \
    --cc=newren@gmail.com \
    --cc=vdye@github.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).