From: Junio C Hamano Date: Mon, 26 Sep 2016 23:09:20 +0000 (-0700) Subject: Merge branch 'tg/add-chmod+x-fix' X-Git-Tag: v2.11.0-rc0~109 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ebc63580a1287325eef85e96c436de494406fd0a Merge branch 'tg/add-chmod+x-fix' "git add --chmod=+x " added recently only toggled the executable bit for paths that are either new or modified. This has been corrected to flip the executable bit for all paths that match the given pathspec. * tg/add-chmod+x-fix: t3700-add: do not check working tree file mode without POSIXPERM t3700-add: create subdirectory gently add: modify already added files when --chmod is given read-cache: introduce chmod_index_entry update-index: add test for chmod flags --- ebc63580a1287325eef85e96c436de494406fd0a diff --cc read-cache.c index 31eddec5f7,c2b2e970bc..38d67faf70 --- a/read-cache.c +++ b/read-cache.c @@@ -624,10 -627,10 +624,10 @@@ void set_object_name_for_intent_to_add_ unsigned char sha1[20]; if (write_sha1_file("", 0, blob_type, sha1)) die("cannot create an empty blob in the object database"); - hashcpy(ce->sha1, sha1); + hashcpy(ce->oid.hash, sha1); } - int add_to_index(struct index_state *istate, const char *path, struct stat *st, int flags, int force_mode) + int add_to_index(struct index_state *istate, const char *path, struct stat *st, int flags) { int size, namelen, was_same; mode_t st_mode = st->st_mode;