Skip to content

apply with core.filemode=false

Junio C Hamano git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest3 patches 3 repliesIn review

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3apply: ignore working tree filemode when !core.filemodeapply.c t/t4129-apply-samemode.sh+35 -20 replies
2/3apply: correctly reverse patch's pre- and post-image mode bitsapply.c+4 -40 replies
3/3apply: code simplificationapply.c+8 -40 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJohannes Schindelin
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] apply with core.filemode=false

Chandra Pratap noticed that "git apply" on a filesystem without executable bit support gives a warning when applying a patch that expects the preimage file to have executable bit on. Dscho noticed that the initial fix by Chandra did not work well when applying a patch in reverse. It turns out that apply.c:reverse_patches() invalidates the "a patch that does not change mode bits have the mode bits in .old_mode member and not in .new_mode member" invariant we rely on.

Here is the result of concerted effort.

Chandra Pratap (1):
apply: ignore working tree filemode when !core.filemode

Junio C Hamano (2):
apply: correctly reverse patch's pre- and post-image mode bits
apply: code simplification

 apply.c                   | 16 +++++++++++++---
 t/t4129-apply-samemode.sh | 27 +++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0-174-g055bb6e996