git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Denton LiuNext: Denton Liu
Message 5 of 9 in “checkout: teach --worktree”
  1. checkout: teach --worktreeDenton Liu, Jun 13, 2020
  2. Eric SunshineJun 14, 2020
  3. Denton LiuJun 14, 2020
  4. Denton LiuJun 14, 2020
  5. Junio C HamanoJun 14, 2020
  6. checkout: teach --worktreeDenton Liu, Jun 14, 2020
  7. Phillip WoodJun 16, 2020
  8. Denton LiuJun 23, 2020
  9. Phillip WoodJun 24, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.