Re: [PATCH 2/2] t7700: do not use "touch -r"
On Thu, Jan 23, 2014 at 01:24:44PM -0800, Junio C Hamano wrote: > Jeff King 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. That's what I meant. :) Thanks, looks good to me. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] t7700: do not use "touch -r"
Jeff King 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 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 Signed-off-by: Junio C Hamano --- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] t7700: do not use "touch -r"
On Thu, Jan 23, 2014 at 01:12:55PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > ... The test does not care about the timestamp of the > > .keep file it creates at all, only that it exists. > > Please refrain from using "touch" for such use cases in the first > place. It appears that > > >pack-$packsha1.keep && > > is what the test wants. 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? -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] t7700: do not use "touch -r"
Jeff King writes: > ... The test does not care about the timestamp of the > .keep file it creates at all, only that it exists. Please refrain from using "touch" for such use cases in the first place. It appears that >pack-$packsha1.keep && is what the test wants. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] t7700: do not use "touch -r"
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. So we can simply drop the use of "-r". Signed-off-by: Jeff King --- 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..f9f9014 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 && + touch 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.8.5.2.500.g8060133 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html