Commit 838d6a9
clean: only lstat files in pathspec
Even though "git clean" takes pathspec to limit the part of the
working tree to be cleaned, it checked the paths it encounters
during its directory traversal with lstat(2), before checking if
the path is within the pathspec.
Ignore paths outside pathspec and proceed without checking with
lstat(2). Even if such a path is unreadable due to e.g. EPERM,
"git clean" should not care.
Signed-off-by: David Turner <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 282616c commit 838d6a9
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | 943 | | |
947 | 944 | | |
948 | 945 | | |
949 | 946 | | |
950 | 947 | | |
951 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| |||
0 commit comments