Commit e3cc41b
apply: make i-t-a entries never match worktree
By definition, an intent-to-add index entry can never match the
worktree, because worktrees have no concept of intent-to-add entries.
Therefore, "apply --index" should always fail on intent-to-add paths.
Because check_preimage() calls verify_index_match(), it already fails
for patches other than creation patches, which check_preimage() ignores.
This patch adds a check to check_preimage()'s rough equivalent for
creation patches, check_to_create().
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Raymond E. Pasco <ray@ameretat.dev>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 7cfde3f commit e3cc41b
1 file changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3740 | 3740 | | |
3741 | 3741 | | |
3742 | 3742 | | |
| 3743 | + | |
3743 | 3744 | | |
3744 | 3745 | | |
3745 | 3746 | | |
3746 | 3747 | | |
3747 | 3748 | | |
3748 | 3749 | | |
3749 | 3750 | | |
3750 | | - | |
3751 | | - | |
3752 | | - | |
3753 | | - | |
3754 | | - | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
3755 | 3766 | | |
3756 | 3767 | | |
3757 | 3768 | | |
| |||
3938 | 3949 | | |
3939 | 3950 | | |
3940 | 3951 | | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
3941 | 3955 | | |
3942 | 3956 | | |
3943 | 3957 | | |
| |||
0 commit comments