Re: [PATCH] checkout: teach --worktree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 14, 2020, 21:37 UTC
- Message-ID
- <xmqqa715xrb0.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAPig+cQ_G+N=mYqO+=7UaAYft27MhZ2_3v8=QzYpDn5hQySp+A@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 6 quoted lines
>> + When writing contents, only modify files in the worktree. Do not >> + modify the index. This option is essentially a no-op when used >> + without a `<tree-ish>`. > > Why a no-op rather than actually diagnosing that --worktree makes no > sense in that case and erroring out?
Should it be a no-op? If checking paths out of the index, with or without the new --worktree option, the files in the working tree will be affected and the contents in the index won't change.