Re: [PATCH v2 16/27] t1400: Test one mistake at a time

2014-03-31 Thread Michael Haggerty
On 03/31/2014 11:50 PM, Junio C Hamano wrote:
> Michael Haggerty  writes:
> 
>> This case wants to test passing a bad refname to the "update" command.
>> But it also passes too few arguments to "update", which muddles the
>> situation: which error should be diagnosed?  So split this test into
>> two:
>>
>> * One that passes too few arguments to update
>>
>> * One that passes all three arguments to "update", but with a bad
>>   refname.
>>
>> Signed-off-by: Michael Haggerty 
>>
>> t1400: Add a test of "update" with too few arguments
>>
>> Signed-off-by: Michael Haggerty 
> 
> What's happening here?

That was a squashing accident, also pointed out by Brad [1].  The last
three lines should be deleted.  This and an error in a comment in patch
14/27 that was also pointed out by Brad are both fixed in my GitHub repo
[2].  I haven't sent the fixed version to the list, though; let me know
if I should.

Michael

[1] http://article.gmane.org/gmane.comp.version-control.git/245205
[2] Branch "ref-transactions" at https://github.com/mhagger/git

-- 
Michael Haggerty
mhag...@alum.mit.edu
http://softwareswirl.blogspot.com/
--
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 v2 16/27] t1400: Test one mistake at a time

2014-03-31 Thread Junio C Hamano
Michael Haggerty  writes:

> This case wants to test passing a bad refname to the "update" command.
> But it also passes too few arguments to "update", which muddles the
> situation: which error should be diagnosed?  So split this test into
> two:
>
> * One that passes too few arguments to update
>
> * One that passes all three arguments to "update", but with a bad
>   refname.
>
> Signed-off-by: Michael Haggerty 
>
> t1400: Add a test of "update" with too few arguments
>
> Signed-off-by: Michael Haggerty 

What's happening here?

> ---
>  t/t1400-update-ref.sh | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
> index 2d61cce..6b21e45 100755
> --- a/t/t1400-update-ref.sh
> +++ b/t/t1400-update-ref.sh
> @@ -724,8 +724,14 @@ test_expect_success 'stdin -z fails update with no ref' '
>   grep "fatal: update line missing " err
>  '
>  
> +test_expect_success 'stdin -z fails update with too few args' '
> + printf $F "update $a" "$m" >stdin &&
> + test_must_fail git update-ref -z --stdin err &&
> + grep "fatal: update $a missing " err
> +'
> +
>  test_expect_success 'stdin -z fails update with bad ref name' '
> - printf $F "update ~a" "$m" >stdin &&
> + printf $F "update ~a" "$m" "" >stdin &&
>   test_must_fail git update-ref -z --stdin err &&
>   grep "fatal: invalid ref format: ~a" err
>  '
--
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 v2 16/27] t1400: Test one mistake at a time

2014-03-26 Thread Brad King
On 03/24/2014 01:56 PM, Michael Haggerty wrote:
> Signed-off-by: Michael Haggerty 
> 
> t1400: Add a test of "update" with too few arguments
> 
> Signed-off-by: Michael Haggerty 

This looks like a stray squash message.

-Brad

--
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 v2 16/27] t1400: Test one mistake at a time

2014-03-24 Thread Michael Haggerty
This case wants to test passing a bad refname to the "update" command.
But it also passes too few arguments to "update", which muddles the
situation: which error should be diagnosed?  So split this test into
two:

* One that passes too few arguments to update

* One that passes all three arguments to "update", but with a bad
  refname.

Signed-off-by: Michael Haggerty 

t1400: Add a test of "update" with too few arguments

Signed-off-by: Michael Haggerty 
---
 t/t1400-update-ref.sh | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 2d61cce..6b21e45 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -724,8 +724,14 @@ test_expect_success 'stdin -z fails update with no ref' '
grep "fatal: update line missing " err
 '
 
+test_expect_success 'stdin -z fails update with too few args' '
+   printf $F "update $a" "$m" >stdin &&
+   test_must_fail git update-ref -z --stdin err &&
+   grep "fatal: update $a missing " err
+'
+
 test_expect_success 'stdin -z fails update with bad ref name' '
-   printf $F "update ~a" "$m" >stdin &&
+   printf $F "update ~a" "$m" "" >stdin &&
test_must_fail git update-ref -z --stdin err &&
grep "fatal: invalid ref format: ~a" err
 '
-- 
1.9.0

--
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