Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:37

drafnel@gmail.com writes:

+	test -f "$fsha1path" -a ! "$fsha1path" -nt "$packfile" -a \
+				! "$fsha1path" -ot "$packfile" &&
+	test -f "$csha1path" -a ! "$csha1path" -nt "$packfile" -a \
+				! "$csha1path" -ot "$packfile" &&
+	test -f "$tsha1path" -a ! "$tsha1path" -nt "$packfile" -a \
+				! "$tsha1path" -ot "$packfile"
+'
"Test" primaries -nt/-ot are unfortunately excluded from POSIX.

Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:37

Junio C Hamano wrote:
drafnel@gmail.com writes:

quoted
+	test -f "$fsha1path" -a ! "$fsha1path" -nt "$packfile" -a \
+				! "$fsha1path" -ot "$packfile" &&
+	test -f "$csha1path" -a ! "$csha1path" -nt "$packfile" -a \
+				! "$csha1path" -ot "$packfile" &&
+	test -f "$tsha1path" -a ! "$tsha1path" -nt "$packfile" -a \
+				! "$tsha1path" -ot "$packfile"
+'
"Test" primaries -nt/-ot are unfortunately excluded from POSIX.
hrmph, and it even worked on solaris ksh.

-brandon

Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:37

Brandon Casey wrote:
Junio C Hamano wrote:
quoted
drafnel@gmail.com writes:

quoted
+	test -f "$fsha1path" -a ! "$fsha1path" -nt "$packfile" -a \
+				! "$fsha1path" -ot "$packfile" &&
+	test -f "$csha1path" -a ! "$csha1path" -nt "$packfile" -a \
+				! "$csha1path" -ot "$packfile" &&
+	test -f "$tsha1path" -a ! "$tsha1path" -nt "$packfile" -a \
+				! "$tsha1path" -ot "$packfile"
+'
"Test" primaries -nt/-ot are unfortunately excluded from POSIX.
hrmph, and it even worked on solaris ksh.
FYI, also works with dash, and there is a use of '-nt' in git-mergetool.sh
which is not exercised by the test suite.

Maybe I'll think about a perl version.

Also, do you have a url to your posix reference?

-brandon

Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects

From: Jeff King <hidden>
Date: 2016-06-15 22:44:37

On Mon, May 19, 2008 at 03:27:02PM -0500, Brandon Casey wrote:
Also, do you have a url to your posix reference?
I generally use:

  http://www.opengroup.org/onlinepubs/009695399/

Specifically:

  http://www.opengroup.org/onlinepubs/009695399/utilities/test.html

-Peff

Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:37

Jeff King wrote:
On Mon, May 19, 2008 at 03:27:02PM -0500, Brandon Casey wrote:
quoted
Also, do you have a url to your posix reference?
I generally use:

  http://www.opengroup.org/onlinepubs/009695399/
That's what I was looking for (didn't look hard enough).
Specifically:

  http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
This should be more accurate than my old reference: 'man test' :)

thanks,
-brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help