Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-02-28 23:12:57 +0300
committerJohannes Sixt <j6t@kdbg.org>2009-03-19 23:47:14 +0300
commit1f553918a8482ea792e8cd4d5d2c75fe60f68aae (patch)
tree1227021499212fafc4d70e2030813598f68292c0 /t/t1410-reflog.sh
parent8586f98bd29bd4ad3d0e62a3be4a4d59ff8b27cd (diff)
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>
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-xt/t1410-reflog.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 5b24f05573..80af6b9b7e 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -70,9 +70,7 @@ test_expect_success setup '
E=`git rev-parse --verify HEAD:A/B/E` &&
check_fsck &&
- chmod +x C &&
- ( test "`git config --bool core.filemode`" != false ||
- echo executable >>C ) &&
+ test_chmod +x C &&
git add C &&
test_tick && git commit -m dragon &&
L=`git rev-parse --verify HEAD` &&