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:
authorPete Wyckoff <pw@padd.com>2013-01-27 07:11:17 +0400
committerJunio C Hamano <gitster@pobox.com>2013-01-27 10:00:39 +0400
commite9df0f9c7a7fbaed924273d0a9b502171ed23b7c (patch)
treeefc692207e049a3ddfc3403c3ab190127563a6a1 /t/t9807-git-p4-submit.sh
parent9d01ae9f20435b90619c909e9cbb9ca29f7de494 (diff)
git p4: cygwin p4 client does not mark read-only
There are some old versions of p4, compiled for cygwin, that treat read-only files differently. Normally, a file that is not open is read-only, meaning that "test -w" on the file is false. This works on unix, and it works on windows using the NT version of p4. The cygwin version of p4, though, changes the permissions, but does not set the windows read-only attribute, so "test -w" returns false. Notice this oddity and make the tests work, even on cygiwn. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9807-git-p4-submit.sh')
-rwxr-xr-xt/t9807-git-p4-submit.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh
index 0ae048f29f..1fb7bc7cf9 100755
--- a/t/t9807-git-p4-submit.sh
+++ b/t/t9807-git-p4-submit.sh
@@ -17,6 +17,16 @@ test_expect_success 'init depot' '
)
'
+test_expect_failure 'is_cli_file_writeable function' '
+ (
+ cd "$cli" &&
+ echo a >a &&
+ is_cli_file_writeable a &&
+ ! is_cli_file_writeable file1 &&
+ rm a
+ )
+'
+
test_expect_success 'submit with no client dir' '
test_when_finished cleanup_git &&
git p4 clone --dest="$git" //depot &&
@@ -200,7 +210,7 @@ test_expect_success 'submit copy' '
(
cd "$cli" &&
test_path_is_file file5.ta &&
- test ! -w file5.ta
+ ! is_cli_file_writeable file5.ta
)
'
@@ -219,7 +229,7 @@ test_expect_success 'submit rename' '
cd "$cli" &&
test_path_is_missing file6.t &&
test_path_is_file file6.ta &&
- test ! -w file6.ta
+ ! is_cli_file_writeable file6.ta
)
'