From: Junio C Hamano <gitster@pobox.com>
To: izabela.bakollari@gmail.com
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t9363: Cleanup old version of code
Date: Sat, 31 Oct 2020 09:56:21 -0700 [thread overview]
Message-ID: <xmqqr1pe49my.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201031151434.36400-1-izabela.bakollari@gmail.com> (izabela bakollari's message of "Sat, 31 Oct 2020 16:14:34 +0100")
izabela.bakollari@gmail.com writes:
> From: Izabela Bakollari <izabela.bakollari@gmail.com>
> Subject: [PATCH] t9363: Cleanup old version of code
Micronit. As you can see from "git shortlog --no-merges --since=9.weeks",
the convention here is not capitalize the word after "<area>:", i.e.
Subject: [PATCH] t9363: clean up old version of code
> Change style for `cd` in subshell.
>
> Signed-off-by: Izabela Bakollari <izabela.bakollari@gmail.com>
> ---
> contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh b/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
> index 6187ec67fa..f09a7ed034 100755
> --- a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
> +++ b/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh
> @@ -53,8 +53,12 @@ test_expect_failure 'git clone works on previously created wiki with media files
> git clone -c remote.origin.mediaimport=true \
> mediawiki::'"$WIKI_URL"' mw_dir_clone &&
> test_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt &&
> - (cd mw_dir_clone && git checkout HEAD^) &&
> - (cd mw_dir && git checkout HEAD^) &&
> + (
> + cd mw_dir_clone && git checkout HEAD^
> + ) &&
> + (
> + cd mw_dir && git checkout HEAD^
> + ) &&
This is not wrong per-se, but I do not think it is too ambitious a
clean-up to declare
(cd there && git any-single-git-command-with-args)
is an obsolete style and recommend it to be rewritten to
git -C there any-single-git-command-with-args
In other words, I think
> test_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt &&
> - (cd mw_dir_clone && git checkout HEAD^) &&
> - (cd mw_dir && git checkout HEAD^) &&
> + git -C mw_dir_clone checkout HEAD^ &&
> + git -C mw_dir checkout HEAD^ &&
would be more preferrable.
> test_path_is_file mw_dir_clone/Foo.txt &&
> test_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt
> '
Thanks.
prev parent reply other threads:[~2020-10-31 16:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 15:14 [PATCH] t9363: Cleanup old version of code izabela.bakollari
2020-10-31 16:56 ` Junio C Hamano [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr1pe49my.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=izabela.bakollari@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).