Re: [PATCH 2/3] Add test for commit --dry-run --short.

2018-09-01 Thread SZEDER Gábor
On Thu, Aug 30, 2018 at 10:39:20PM -0700, Stephen P. Smith wrote:
> diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
> index 810d4cea7..fc69da816 100755
> --- a/t/t7501-commit.sh
> +++ b/t/t7501-commit.sh
> @@ -682,4 +682,14 @@ test_expect_success '--dry-run with conflicts fixed from 
> a merge' '
>   git commit -m "conflicts fixed from merge."
>  '
>  
> +test_expect_success '--dry-run --short with conflicts fixed from a merge' '
> + # setup two branches with conflicting information
> + # in the same file, resolve the conflict,
> + # call commit with --dry-run --short

I think the last line of the comment is unnecessary: it doesn't say
anything that is not obvious from the test's last line.

> + rm -f test-file &&
> + touch testfile &&

That filename should be 'test-file', i.e. with a dash, shouldn't it?

Anyway, if you want to truncate the file, then please use '>test-file'
instead of 'rm' and 'touch'.

> + git add test-file &&
> + git commit --dry-run --short
> +'
> +
>  test_done
> -- 
> 2.18.0
> 


Re: [PATCH 2/3] Add test for commit --dry-run --short.

2018-08-31 Thread Stephen & Linda Smith
On Friday, August 31, 2018 9:26:02 AM MST Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason  writes:
> > 
> > Ditto my comment on 1/3 on this. I.e. this changes the failing tests in
> > this series from 2 to 3.
> 
> Correct.  Thanks for helping Stephen on this topic.

I wasn't sure how this situation was normally handled.  I will update when I 
re-roll changes for wt-status.c.






Re: [PATCH 2/3] Add test for commit --dry-run --short.

2018-08-31 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason  writes:

> On Fri, Aug 31 2018, Stephen P. Smith wrote:
>
>> Add test for commit with --dry-run --short for a new file of zero
>> length.
>>
>> The test demonstrated that the setting of the commitable flag was
>> broken as was found durning an earlier patch review.
>>
>> Signed-off-by: Stephen P. Smith 
>> ---
>>  t/t7501-commit.sh | 10 ++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
>> index 810d4cea7..fc69da816 100755
>> --- a/t/t7501-commit.sh
>> +++ b/t/t7501-commit.sh
>> @@ -682,4 +682,14 @@ test_expect_success '--dry-run with conflicts fixed 
>> from a merge' '
>>  git commit -m "conflicts fixed from merge."
>>  '
>>
>> +test_expect_success '--dry-run --short with conflicts fixed from a merge' '
>> +# setup two branches with conflicting information
>> +# in the same file, resolve the conflict,
>> +# call commit with --dry-run --short
>> +rm -f test-file &&
>> +touch testfile &&
>> +git add test-file &&
>> +git commit --dry-run --short
>> +'
>> +
>>  test_done
>
> Ditto my comment on 1/3 on this. I.e. this changes the failing tests in
> this series from 2 to 3.

Correct.  Thanks for helping Stephen on this topic.


Re: [PATCH 2/3] Add test for commit --dry-run --short.

2018-08-31 Thread Ævar Arnfjörð Bjarmason


On Fri, Aug 31 2018, Stephen P. Smith wrote:

> Add test for commit with --dry-run --short for a new file of zero
> length.
>
> The test demonstrated that the setting of the commitable flag was
> broken as was found durning an earlier patch review.
>
> Signed-off-by: Stephen P. Smith 
> ---
>  t/t7501-commit.sh | 10 ++
>  1 file changed, 10 insertions(+)
>
> diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
> index 810d4cea7..fc69da816 100755
> --- a/t/t7501-commit.sh
> +++ b/t/t7501-commit.sh
> @@ -682,4 +682,14 @@ test_expect_success '--dry-run with conflicts fixed from 
> a merge' '
>   git commit -m "conflicts fixed from merge."
>  '
>
> +test_expect_success '--dry-run --short with conflicts fixed from a merge' '
> + # setup two branches with conflicting information
> + # in the same file, resolve the conflict,
> + # call commit with --dry-run --short
> + rm -f test-file &&
> + touch testfile &&
> + git add test-file &&
> + git commit --dry-run --short
> +'
> +
>  test_done

Ditto my comment on 1/3 on this. I.e. this changes the failing tests in
this series from 2 to 3.


[PATCH 2/3] Add test for commit --dry-run --short.

2018-08-30 Thread Stephen P. Smith
Add test for commit with --dry-run --short for a new file of zero
length.

The test demonstrated that the setting of the commitable flag was
broken as was found durning an earlier patch review.

Signed-off-by: Stephen P. Smith 
---
 t/t7501-commit.sh | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 810d4cea7..fc69da816 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -682,4 +682,14 @@ test_expect_success '--dry-run with conflicts fixed from a 
merge' '
git commit -m "conflicts fixed from merge."
 '
 
+test_expect_success '--dry-run --short with conflicts fixed from a merge' '
+   # setup two branches with conflicting information
+   # in the same file, resolve the conflict,
+   # call commit with --dry-run --short
+   rm -f test-file &&
+   touch testfile &&
+   git add test-file &&
+   git commit --dry-run --short
+'
+
 test_done
-- 
2.18.0