* [PATCH 1/2] t0001-init: fix a file name
@ 2009-08-09 15:38 Johannes Sixt
2009-08-09 15:39 ` [PATCH 2/2] t0001-init: split the existence test from the permission test Johannes Sixt
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2009-08-09 15:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
Without this change, grep fails because it does not find the file
instead of because it does not find the text in the file.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
t/t0001-init.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 49caa29..07e011d 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -251,7 +251,7 @@ test_expect_success 'init creates a new deep directory' '
git init --bare --shared=0660 newdir/a/b/c &&
test -d newdir/a/b/c/refs &&
ls -ld newdir/a newdir/a/b > lsab.out &&
- ! grep -v "^drwxrw[sx]r-x" ls.out &&
+ ! grep -v "^drwxrw[sx]r-x" lsab.out &&
ls -ld newdir/a/b/c > lsc.out &&
! grep -v "^drwxrw[sx]---" lsc.out
)
--
1.6.4.1186.g1d9a
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] t0001-init: split the existence test from the permission test
2009-08-09 15:38 [PATCH 1/2] t0001-init: fix a file name Johannes Sixt
@ 2009-08-09 15:39 ` Johannes Sixt
2009-08-09 16:02 ` [PATCH v2 " Johannes Sixt
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2009-08-09 15:39 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
The test for correct permissions after init created a deep directory
must be guarded by POSIXPERM. But testing that the deep dirctory exists
is good even on platforms that do not provide the POSIXPERM prerequiste.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
t/t0001-init.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 07e011d..e53b234 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -245,6 +245,14 @@ test_expect_success 'init recreates a new bare directory' '
test_expect_success 'init creates a new deep directory' '
rm -fr newdir &&
(
+ git init newdir/a/b/c &&
+ test -d newdir/a/b/c/.git/refs
+ )
+'
+
+test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shared)' '
+ rm -fr newdir &&
+ (
# Leading directories should honor umask while
# the repository itself should follow "shared"
umask 002 &&
--
1.6.4.1186.g1d9a
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] t0001-init: split the existence test from the permission test
2009-08-09 15:39 ` [PATCH 2/2] t0001-init: split the existence test from the permission test Johannes Sixt
@ 2009-08-09 16:02 ` Johannes Sixt
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Sixt @ 2009-08-09 16:02 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
The test for correct permissions after init created a deep directory
must be guarded by POSIXPERM. But testing that the deep dirctory exists
is good even on platforms that do not provide the POSIXPERM prerequiste.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Sorry, the first version was the result of mindless copying. This version
removes the sub-shell (parentheses).
-- Hannes
t/t0001-init.sh | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 07e011d..5386504 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -244,6 +244,12 @@ test_expect_success 'init recreates a new bare directory' '
test_expect_success 'init creates a new deep directory' '
rm -fr newdir &&
+ git init newdir/a/b/c &&
+ test -d newdir/a/b/c/.git/refs
+'
+
+test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shared)' '
+ rm -fr newdir &&
(
# Leading directories should honor umask while
# the repository itself should follow "shared"
--
1.6.4.1186.g1d9a
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-09 16:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-09 15:38 [PATCH 1/2] t0001-init: fix a file name Johannes Sixt
2009-08-09 15:39 ` [PATCH 2/2] t0001-init: split the existence test from the permission test Johannes Sixt
2009-08-09 16:02 ` [PATCH v2 " Johannes Sixt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.