clone: run check_everything_connected
[gitweb.git] / t / lib-git-p4.sh
index d5596ded6cc2a9b68f073d070ca3714349886738..2098b9ba053b09b00ed4382aa55ea0802d749d89 100644 (file)
@@ -142,8 +142,22 @@ client_view() {
                Description: $P4CLIENT
                Root: $cli
                AltRoots: $(native_path "$cli")
+               LineEnd: unix
                View:
                EOF
                printf "\t%s\n" "$@"
        ) | p4 client -i
 }
+
+is_cli_file_writeable() {
+       # cygwin version of p4 does not set read-only attr,
+       # will be marked 444 but -w is true
+       file="$1" &&
+       if test_have_prereq CYGWIN && p4 -V | grep -q CYGWIN
+       then
+               stat=$(stat --format=%a "$file") &&
+               test $stat = 644
+       else
+               test -w "$file"
+       fi
+}