All of lore.kernel.org
 help / color / mirror / Atom feed
From: Victoria Dye <vdye@github.com>
To: Vivan Garg <gvivan6@gmail.com>, git@vger.kernel.org
Cc: christian.couder@gmail.com, hariom18599@gmail.com
Subject: Re: [GSOC][PATCH] t4121: modernize test style
Date: Tue, 21 Feb 2023 09:22:12 -0800	[thread overview]
Message-ID: <38cb184d-e47a-2129-a93e-16ffd2afe67a@github.com> (raw)
In-Reply-To: <20230220235121.34375-1-gvivan6@gmail.com>

Vivan Garg wrote:
> Test scripts in file t4121-apply-diffs.sh are written in old style,
> where the test_expect_success command and test title are written on
> separate lines

nit: period at the end of the sentence (s/lines/lines.)

Also, this commit message explains *why* you're making the change, but not
what the commit actually does (that is, update the tests to adhere to the
new style). Would you mind adding a note about that to the message?

> 
> Signed-off-by: Vivan Garg <gvivan6@gmail.com>
> ---
> Greetings, my name is Vivan Garg. I am currently pursuing a double major
> in computer science and finance at the University of Waterloo in Canada. 
> I am currently completing my third software developer internship at Morgan
> Stanley. As part of my coursework, I studied C and shell scripting, which 
> I then applied in internships and personal projects. C++ is the programming 
> language that I am most comfortable with right now. Please feel free to 
> address me as Vivan, and my pronouns are he/him/his. I meet the requirements 
> for GSOC participation. So far, I've either read or skimmed the following 
> documents based on prior knowledge: Submitting patches, Coding guidelines, 
> Myfirstcontribution.txt, gittutorial, Giteveryday, readme, Hacking-Git, 
> General-Microproject-Information, SoC-2023-Ideas, and 
> General-Application-Information. I'm looking forward to having a fantastic 
> time here! 

Welcome to the Git community, and thanks for your contribution! :) 

> 
>  t/t4121-apply-diffs.sh | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/t/t4121-apply-diffs.sh b/t/t4121-apply-diffs.sh
> index a80cec9d11..2ff38ededa 100755
> --- a/t/t4121-apply-diffs.sh
> +++ b/t/t4121-apply-diffs.sh
> @@ -16,8 +16,8 @@ echo '1
>  7
>  8' >file
>  
> -test_expect_success 'setup' \
> -	'git add file &&
> +test_expect_success 'setup' '
> +	git add file &&
>  	git commit -q -m 1 &&
>  	git checkout -b test &&
>  	mv file file.tmp &&
> @@ -27,10 +27,11 @@ test_expect_success 'setup' \
>  	git commit -a -q -m 2 &&
>  	echo 9 >>file &&
>  	git commit -a -q -m 3 &&
> -	git checkout main'
> +	git checkout main
> +'

This test looks good.

>  
> -test_expect_success \
> -	'check if contextually independent diffs for the same file apply' \
> -	'( git diff test~2 test~1 && git diff test~1 test~0 )| git apply'
> +test_expect_success 'check if contextually independent diffs for the same file apply' '
> +	( git diff test~2 test~1 && git diff test~1 test~0 )| git apply
> +'

As for this one, the test is correctly updated to the new style (per the
microproject prompt). However, the spacing around the '|' is a little weird
- I think there should be a space after ')'. On your next re-roll, could you
fix that spacing (in this patch is fine - it's not a substantial enough
change to warrant its own commit)?

>  
>  test_done


  reply	other threads:[~2023-02-21 17:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 23:51 [GSOC][PATCH] t4121: modernize test style Vivan Garg
2023-02-21 17:22 ` Victoria Dye [this message]
2023-02-21 19:48   ` Vivan Garg
2023-02-21 20:21     ` Junio C Hamano
2023-02-21 21:27       ` [GSOC][PATCH v2 0/1] " Vivan Garg
2023-02-21 21:27         ` [GSOC][PATCH v2 1/1] " Vivan Garg
2023-02-22  5:19       ` [GSOC][PATCH] " Vivan Garg
2023-02-21 21:46 ` [GSOC][PATCH v2 0/1] " Vivan Garg
2023-02-21 21:46   ` [GSOC][PATCH v2 1/1] " Vivan Garg
2023-02-21 22:05     ` Victoria Dye
2023-02-21 22:34       ` Vivan Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38cb184d-e47a-2129-a93e-16ffd2afe67a@github.com \
    --to=vdye@github.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gvivan6@gmail.com \
    --cc=hariom18599@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.