]> git.ipfire.org Git - thirdparty/git.git/commit - t/t4014-format-patch.sh
test-lib: Introduce test_chmod and use it instead of update-index --chmod
authorJohannes Sixt <j6t@kdbg.org>
Sat, 28 Feb 2009 20:12:57 +0000 (21:12 +0100)
committerJohannes Sixt <j6t@kdbg.org>
Thu, 19 Mar 2009 20:47:14 +0000 (21:47 +0100)
commit1f553918a8482ea792e8cd4d5d2c75fe60f68aae
tree1227021499212fafc4d70e2030813598f68292c0
parent8586f98bd29bd4ad3d0e62a3be4a4d59ff8b27cd
test-lib: Introduce test_chmod and use it instead of update-index --chmod

This function replaces sequences of 'chmod +x' and 'git update-index
--chmod=+x' in the test suite, whose purpose is to help filesystems
that need core.filemode=false. Two places where only 'chmod +x' was used
we also use this new function.

The function calls 'git update-index --chmod' without checking
core.filemode (unlike some of the call sites did). We do this because the
call sites *expect* that the executable bit ends up in the index (ie. it
is not the purpose of the call sites to *test* whether git treats
'chmod +x' and 'update-index --chmod=+x' correctly). Therefore, on
filesystems with core.filemode=true the 'git update-index --chmod' is a
no-op.

The function uses --add with update-index to help one call site in
t6031-merge-recursive. It makes no difference for the other callers.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
t/t1410-reflog.sh
t/t3400-rebase.sh
t/t4006-diff-mode.sh
t/t4014-format-patch.sh
t/t6031-merge-recursive.sh
t/t9500-gitweb-standalone-no-errors.sh
t/test-lib.sh