Re: [PATCH v4 03/11] t6050-replace: test that objects are of the same type

2013-09-05 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com

 Christian Couder chrisc...@tuxfamily.org writes:
  
 +test_expect_success 'replaced and replacement objects must be of the same 
 type' '
 +test_must_fail git replace mytag $HASH1 2err 
 +grep mytag. points to a replaced object of type .tag err 
 +grep $HASH1. points to a replacement object of type .commit err 
 
 Hmm, would these messages ever get translated?  I think it is
 sufficient to make sure that the proposed replacement fails for
 these cases.

Ok, I will get rid of the grep statements.

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


Re: [PATCH v4 03/11] t6050-replace: test that objects are of the same type

2013-09-04 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes:

 Signed-off-by: Christian Couder chrisc...@tuxfamily.org
 ---
  t/t6050-replace.sh | 13 +
  1 file changed, 13 insertions(+)

 diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
 index decdc33..5c352c4 100755
 --- a/t/t6050-replace.sh
 +++ b/t/t6050-replace.sh
 @@ -263,4 +263,17 @@ test_expect_success 'not just commits' '
   test_cmp file.replaced file
  '
  
 +test_expect_success 'replaced and replacement objects must be of the same 
 type' '
 + test_must_fail git replace mytag $HASH1 2err 
 + grep mytag. points to a replaced object of type .tag err 
 + grep $HASH1. points to a replacement object of type .commit err 

Hmm, would these messages ever get translated?  I think it is
sufficient to make sure that the proposed replacement fails for
these cases.

 + test_must_fail git replace HEAD^{tree} HEAD~1 2err 
 + grep HEAD^{tree}. points to a replaced object of type .tree err 
 + grep HEAD~1. points to a replacement object of type .commit err 
 + BLOB=$(git rev-parse :file) 
 + test_must_fail git replace HEAD^ $BLOB 2err 
 + grep HEAD^. points to a replaced object of type .commit err 
 + grep $BLOB. points to a replacement object of type .blob err
 +'
 +
  test_done
--
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