Skip to content

Commit

Permalink
Add test case for the change
Browse files Browse the repository at this point in the history
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
  • Loading branch information
Chandra Pratap committed Dec 10, 2023
1 parent 71dc157 commit 7c00dc5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions t/t4129-apply-samemode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,21 @@ test_expect_success POSIXPERM 'do not use core.sharedRepository for working tree
test_cmp d_mode.expected d_mode.actual
)
'
test_expect_success FILEMODE 'ensure git apply respects core.fileMode' '
test_tick && git commit -m initial --allow-empty &&
test_config core.fileMode false &&
echo true >script.sh &&
git add --chmod=+x script.sh &&
test_tick && git commit -m "Add script" &&
echo true >>script.sh &&
test_tick && git commit -m "Modify script" script.sh &&
git format-patch -1 --stdout >patch &&
git switch -c branch HEAD^ &&
git apply patch
'


test_done

0 comments on commit 7c00dc5

Please sign in to comment.