All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] t7700: do not use "touch -r"
Date: Thu, 23 Jan 2014 13:24:44 -0800	[thread overview]
Message-ID: <xmqq1tzytmqr.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140123211425.GA21377@sigill.intra.peff.net> (Jeff King's message of "Thu, 23 Jan 2014 16:14:25 -0500")

Jeff King <peff@peff.net> writes:

> Agreed. I was making the minimal change, but I think there is no reason
> not to fix both while we are there. Do you want to just mark up the
> patch in transit?

Let's just queue this instead.

-- >8 --
From: Jeff King <peff@peff.net>
Date: Thu, 23 Jan 2014 14:55:18 -0500
Subject: [PATCH] t7700: do not use "touch" unnecessarily

Some versions of touch (such as /usr/ucb/touch on Solaris)
do not know about the "-r" option. This would make sense as
a feature of test-chmtime, but fortunately this fix is even
easier.

The test does not care about the timestamp of the .keep file it
creates at all, only that it exists. For such a use case, with or
without portability issues around "-r", "touch" should not be used
in the first place.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t7700-repack.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index d954b84..b45bd1e 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -17,7 +17,7 @@ test_expect_success 'objects in packs marked .keep are not repacked' '
 	# The second pack will contain the excluded object
 	packsha1=$(git rev-list --objects --all | grep file2 |
 		git pack-objects pack) &&
-	touch -r pack-$packsha1.pack pack-$packsha1.keep &&
+	>pack-$packsha1.keep &&
 	objsha1=$(git verify-pack -v pack-$packsha1.idx | head -n 1 |
 		sed -e "s/^\([0-9a-f]\{40\}\).*/\1/") &&
 	mv pack-* .git/objects/pack/ &&
-- 
1.9-rc0-234-g8e6341d

  reply	other threads:[~2014-01-23 21:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 19:54 [PATCH 0/2] solaris test fixups Jeff King
2014-01-23 19:54 ` [PATCH 1/2] t7501: fix "empty commit" test with NO_PERL Jeff King
2014-01-23 19:55 ` [PATCH 2/2] t7700: do not use "touch -r" Jeff King
2014-01-23 21:12   ` Junio C Hamano
2014-01-23 21:14     ` Jeff King
2014-01-23 21:24       ` Junio C Hamano [this message]
2014-01-23 21:28         ` Jeff King
2014-01-23 20:52 ` [PATCH 0/2] solaris test fixups Junio C Hamano
2014-01-23 20:54   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1tzytmqr.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.