checkout: clarify comment
The key point for the if statement is that read_tree_some did not update the entry, because either it doesn't exist in tree-ish or doesn't match the pathspec. Clarify that. Suggested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6fdc205722
commit
5160fa0562
@ -304,10 +304,10 @@ static int checkout_paths(const struct checkout_opts *opts,
|
|||||||
continue;
|
continue;
|
||||||
if (opts->source_tree && !(ce->ce_flags & CE_UPDATE))
|
if (opts->source_tree && !(ce->ce_flags & CE_UPDATE))
|
||||||
/*
|
/*
|
||||||
* "git checkout tree-ish -- path", but this entry
|
* "git checkout tree-ish -- path" and this entry
|
||||||
* is in the original index; it will not be checked
|
* is in the original index, but is not in tree-ish
|
||||||
* out to the working tree and it does not matter
|
* or does not match the pathspec; it will not be
|
||||||
* if pathspec matched this entry. We will not do
|
* checked out to the working tree. We will not do
|
||||||
* anything to this entry at all.
|
* anything to this entry at all.
|
||||||
*/
|
*/
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user