Re: [PATCH v3 08/11] t6050-replace: check that -f option bypasses the type check

2013-09-01 Thread Eric Sunshine
On Sat, Aug 31, 2013 at 3:12 PM, Christian Couder
chrisc...@tuxfamily.org wrote:
 Signed-off-by: Christian Couder chrisc...@tuxfamily.org
 ---
  t/t6050-replace.sh | 6 ++
  1 file changed, 6 insertions(+)

 diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
 index 05be228..0b07a0b 100755
 --- a/t/t6050-replace.sh
 +++ b/t/t6050-replace.sh
 @@ -276,6 +276,12 @@ test_expect_success 'replaced and replacement objects 
 must be of the same type'
 grep $BLOB. points to a replacement object of type .blob err
  '

 +test_expect_success '-f option bypasses the type check' '
 +   git replace -f mytag $HASH1 2err 
 +   git replace -f HEAD^{tree} HEAD~1 2err 
 +   git replace -f HEAD^ $BLOB 2err
 +'

Is there a non-obvious reason you are redirecting stderr to a file in
this test? Unlike the test added earlier, this one never consults the
error output. By dropping this apparently unnecessary redirection,
diagnosis of a regression potentially becomes simpler since any error
output from git-replace will become visible when the test is run
verbosely.

 +
  test_expect_success 'replace ref cleanup' '
 test -n $(git replace) 
 git replace -d $(git replace) 
 --
 1.8.4.rc1.31.g530f5ce.dirty
--
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 v3 08/11] t6050-replace: check that -f option bypasses the type check

2013-09-01 Thread Christian Couder
From: Eric Sunshine sunsh...@sunshineco.com

 On Sat, Aug 31, 2013 at 3:12 PM, Christian Couder
 chrisc...@tuxfamily.org wrote:
 Signed-off-by: Christian Couder chrisc...@tuxfamily.org
 ---
  t/t6050-replace.sh | 6 ++
  1 file changed, 6 insertions(+)

 diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
 index 05be228..0b07a0b 100755
 --- a/t/t6050-replace.sh
 +++ b/t/t6050-replace.sh
 @@ -276,6 +276,12 @@ test_expect_success 'replaced and replacement objects 
 must be of the same type'
 grep $BLOB. points to a replacement object of type .blob err
  '

 +test_expect_success '-f option bypasses the type check' '
 +   git replace -f mytag $HASH1 2err 
 +   git replace -f HEAD^{tree} HEAD~1 2err 
 +   git replace -f HEAD^ $BLOB 2err
 +'
 
 Is there a non-obvious reason you are redirecting stderr to a file in
 this test? Unlike the test added earlier, this one never consults the
 error output. By dropping this apparently unnecessary redirection,
 diagnosis of a regression potentially becomes simpler since any error
 output from git-replace will become visible when the test is run
 verbosely.

You are right! I will drop these redirections.

Thanks,
Christian.
--
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