Skip to content

git add --chmod: always change the file

Thomas Gummerer git 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 6 repliesIn review
  2. v34 patches 2 repliesSuperseded
  3. v24 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches3 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4add: document the chmod optionDocumentation/git-add.txt+6 -10 replies
2/4update-index: add test for chmod flagsbuiltin/update-index.c t/t2107-update-index-basic.sh+14 -10 replies
3/4read-cache: introduce chmod_index_entrybuiltin/update-index.c cache.h read-cache.c+33 -143 replies
4/4add: modify already added files when --chmod is givenbuiltin/add.c builtin/checkout.c builtin/commit.c +3 more+91 -343 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/4] git add --chmod: always change the file

Thanks Junio for the review of my last round.

Changes since then:
[1/4]: patch unchanged
[2/4]: Only adds a test now, and corrects the type of the argument of
chmod_path, but leaves the rest of the patch unchanged.
[3/4]: chmod_index_entry now takes a char as argument which can either
be + or -, and changes the mode based on that, instead of using the 0777 or 0666 mode that was passed in from the outside.
[4/4]: Adapted to the different behaviour of chmod_index_entry and
added tests as suggested by Junio.

Thomas Gummerer (4):
add: document the chmod option
update-index: add test for chmod flags
read-cache: introduce chmod_index_entry
add: modify already added files when --chmod is given

 Documentation/git-add.txt     |  7 +++++-
 builtin/add.c                 | 47 ++++++++++++++++++++++++----------------
 builtin/checkout.c            |  2 +-
 builtin/commit.c              |  2 +-
 builtin/update-index.c        | 18 +++-------------
 cache.h                       | 12 ++++++-----
 read-cache.c                  | 43 ++++++++++++++++++++++++++++++-------
 t/t2107-update-index-basic.sh | 13 +++++++++++
 t/t3700-add.sh                | 50 +++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 144 insertions(+), 50 deletions(-)
Signature · 1 line
2.10.0.304.gf2ff484