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(-) -- 2.10.0.304.gf2ff484