Re: [PATCH 6/8] checkout: add --cached option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 1, 2019, 17:57 UTC
- Message-ID
- <xmqqlg2zz90l.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8CHHT=9e9ti7VA4X4h3FrZcUKvLuzkL56mXLgjk4c5Qcg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 5 quoted lines
> Of course we could just do --index and --worktree, each option > restores the respective part. Then it's combinable (and extensible in > the future). But then "git restore" means "git restore --index > --worktree" and typing "git restore --index" effectively removes the > default "--worktree", which seems a bit twisted.
Or "git restore --no-worktree" (essentially, instead of saying "keep", say "no" to mean "negation").
Incidentally, "git restore --no-index" does not have a counterpart in "git checkout", but I think it is probably a good thing to add; as it has to do far more than "git cat-file blob $tree:$path >$path" these days.