Fix t6031 on filesystems without working exec bit
The point of the test is not really to test the ability of the filesystem to keep the given x-bit, but to check is merge-recursive correctly handles it. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alex Riesen committed
May 18, 2008 at 16:57 UTC
28f880241782024ecb212f1641c8dc487124523b
1 file changed
+5
-2
t/t6031-merge-recursive.sh
+5
-2
@@ -3,6 +3,9 @@
3
test_description='merge-recursive: handle file mode'
4
. ./test-lib.sh
5
6
+# Note that we follow "chmod +x F" with "update-index --chmod=+x F" to
7
+# help filesystems that do not have the executable bit.
8
+
9
test_expect_success 'mode change in one branch: keep changed version' '
10
: >file1 &&
11
git add file1 &&
@@ -13,7 +16,7 @@ test_expect_success 'mode change in one branch: keep changed version' '
16
git commit -m a &&
17
git checkout -b b1 master &&
18
chmod +x file1 &&
16
- git add file1 &&
19
+ git update-index --chmod=+x file1 &&
20
git commit -m b1 &&
21
git checkout a1 &&
22
git merge-recursive master -- a1 b1 &&
@@ -26,7 +29,7 @@ test_expect_success 'mode change in both branches: expect conflict' '
29
: >file2 &&
30
H=$(git hash-object file2) &&
31
chmod +x file2 &&
29
- git add file2 &&
32
+ git update-index --add --chmod=+x file2 &&
33
git commit -m a2 &&
34
git checkout -b b2 master &&
35
: >file2 &&