diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-09-29 16:49:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-29 16:49:47 -0700 |
commit | 36f64036f647912c8037e625e9fe3cee6713b105 (patch) | |
tree | 6e0ec6e40eda4724fdc778b4697b705cfc112563 /t/t2107-update-index-basic.sh | |
parent | bf3a55a21b85c04441e67ee1fa08e5eff41ebbe8 (diff) | |
parent | 40e0dc17ce6f8b699c0f9426438362ed658293dc (diff) | |
download | git-36f64036f647912c8037e625e9fe3cee6713b105.tar.gz git-36f64036f647912c8037e625e9fe3cee6713b105.tar.xz |
Merge branch 'tg/add-chmod+x-fix' into maint
"git add --chmod=+x <pathspec>" 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
Diffstat (limited to 't/t2107-update-index-basic.sh')
-rwxr-xr-x | t/t2107-update-index-basic.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh index dfe02f481..32ac6e09b 100755 --- a/t/t2107-update-index-basic.sh +++ b/t/t2107-update-index-basic.sh @@ -80,4 +80,17 @@ test_expect_success '.lock files cleaned up' ' ) ' +test_expect_success '--chmod=+x and chmod=-x in the same argument list' ' + >A && + >B && + git add A B && + git update-index --chmod=+x A --chmod=-x B && + cat >expect <<-\EOF && + 100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 A + 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 B + EOF + git ls-files --stage A B >actual && + test_cmp expect actual +' + test_done |