Re: [PATCH v2] checkout: optimize "git checkout -b <new_branch>"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 31, 2018, 20:01 UTC
- Message-ID
- <xmqq36vzb2eg.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180731163909.19004-1-benpeart@microsoft.com>
Ben Peart <Ben.Peart@microsoft.com> writes:
> The biggest change in this version was suggested in feedback to the last > patch. I have turned on the optimzation by default if sparse-checkout is > not on so that most users do not have to set anything and they will get the > benefit of the optimization.
Sounds like a good thing to do.
If we missed something in the logic of skip_merge_working_tree(), the breakage may affect more unsuspecting people, which may or may not be a bad thing---at least it would allow us to notice it sooner.
> + When set to true, "git checkout -b <new_branch>" will not update the > + skip-worktree bit in the index nor add/remove files in the working > + directory to reflect the current sparse checkout settings.
This reads a lot clearer, at least to me, than the documentation update in the previous round, by speaking in terms of what the user-visible side effect of this setting would be.
Nicely done. Thanks.