Commit 3c37a2e
committed
apply: do not read from the filesystem under --index
We currently read the preimage to apply a patch from the index only
when the --cached option is given. Do so also when the command is
running under the --index option. With --index, the index entry and
the working tree file for a path that is involved in a patch must be
identical, so this should not affect the result, but by reading from
the index, we will get the protection to avoid reading an unintended
path beyond a symbolic link automatically.
Signed-off-by: Junio C Hamano <[email protected]>1 parent c536c07 commit 3c37a2e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3136 | 3136 | | |
3137 | 3137 | | |
3138 | 3138 | | |
3139 | | - | |
| 3139 | + | |
3140 | 3140 | | |
3141 | 3141 | | |
3142 | 3142 | | |
| |||
0 commit comments