Skip to content

Commit 5160fa0

Browse files
tgummerergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gummerer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6fdc205 commit 5160fa0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/checkout.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ static int checkout_paths(const struct checkout_opts *opts,
304304
continue;
305305
if (opts->source_tree && !(ce->ce_flags & CE_UPDATE))
306306
/*
307-
* "git checkout tree-ish -- path", but this entry
308-
* is in the original index; it will not be checked
309-
* out to the working tree and it does not matter
310-
* if pathspec matched this entry. We will not do
307+
* "git checkout tree-ish -- path" and this entry
308+
* is in the original index, but is not in tree-ish
309+
* or does not match the pathspec; it will not be
310+
* checked out to the working tree. We will not do
311311
* anything to this entry at all.
312312
*/
313313
continue;

0 commit comments

Comments
 (0)