{"thread":{"id":"54542","subject":"[PATCH] t9363: Cleanup old version of code","startedAt":"2020-10-31T15:14:47Z","lastAt":"2020-10-31T16:56:26Z","messageCount":2,"participants":["izabela.bakollari@gmail.com","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"408786","messageId":"20201031151434.36400-1-izabela.bakollari@gmail.com","threadId":"54542","inReplyTo":null,"subject":"[PATCH] t9363: Cleanup old version of code","fromName":"","fromEmail":"izabela.bakollari@gmail.com","sentAt":"2020-10-31T15:14:34Z","receivedAt":"2020-10-31T15:14:47Z","isPatch":true,"sender":{"key":"izabela.bakollari@gmail.com","avatar":null},"body":"From: Izabela Bakollari <izabela.bakollari@gmail.com>\n\nChange style for `cd` in subshell.\n\nSigned-off-by: Izabela Bakollari <izabela.bakollari@gmail.com>\n---\n contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --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\nindex 6187ec67fa..f09a7ed034 100755\n--- a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh\n+++ b/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh\n@@ -53,8 +53,12 @@ test_expect_failure 'git clone works on previously created wiki with media files\n \tgit clone -c remote.origin.mediaimport=true \\\n \t\tmediawiki::'\"$WIKI_URL\"' mw_dir_clone &&\n \ttest_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt &&\n-\t(cd mw_dir_clone && git checkout HEAD^) &&\n-\t(cd mw_dir && git checkout HEAD^) &&\n+\t(\n+\t\tcd mw_dir_clone && git checkout HEAD^\n+\t) &&\n+\t(\n+\t\tcd mw_dir && git checkout HEAD^\n+\t) &&\n \ttest_path_is_file mw_dir_clone/Foo.txt &&\n \ttest_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt\n '\n-- \n2.18.4\n\n"},{"id":"408787","messageId":"xmqqr1pe49my.fsf@gitster.c.googlers.com","threadId":"54542","inReplyTo":"20201031151434.36400-1-izabela.bakollari@gmail.com","subject":"Re: [PATCH] t9363: Cleanup old version of code","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-31T16:56:21Z","receivedAt":"2020-10-31T16:56:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"izabela.bakollari@gmail.com writes:\n\n> From: Izabela Bakollari <izabela.bakollari@gmail.com>\n\n> Subject: [PATCH] t9363: Cleanup old version of code\n\nMicronit.  As you can see from \"git shortlog --no-merges --since=9.weeks\",\nthe convention here is not capitalize the word after \"<area>:\", i.e.\n\n    Subject: [PATCH] t9363: clean up old version of code\n\n> Change style for `cd` in subshell.\n>\n> Signed-off-by: Izabela Bakollari <izabela.bakollari@gmail.com>\n> ---\n>  contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh | 8 ++++++--\n>  1 file changed, 6 insertions(+), 2 deletions(-)\n>\n> 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\n> index 6187ec67fa..f09a7ed034 100755\n> --- a/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh\n> +++ b/contrib/mw-to-git/t/t9363-mw-to-git-export-import.sh\n> @@ -53,8 +53,12 @@ test_expect_failure 'git clone works on previously created wiki with media files\n>  \tgit clone -c remote.origin.mediaimport=true \\\n>  \t\tmediawiki::'\"$WIKI_URL\"' mw_dir_clone &&\n>  \ttest_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt &&\n> -\t(cd mw_dir_clone && git checkout HEAD^) &&\n> -\t(cd mw_dir && git checkout HEAD^) &&\n> +\t(\n> +\t\tcd mw_dir_clone && git checkout HEAD^\n> +\t) &&\n> +\t(\n> +\t\tcd mw_dir && git checkout HEAD^\n> +\t) &&\n\nThis is not wrong per-se, but I do not think it is too ambitious a\nclean-up to declare\n\n\t(cd there && git any-single-git-command-with-args)\n\nis an obsolete style and recommend it to be rewritten to\n\n\tgit -C there any-single-git-command-with-args\n\nIn other words, I think\n\n>  \ttest_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt &&\n> -\t(cd mw_dir_clone && git checkout HEAD^) &&\n> -\t(cd mw_dir && git checkout HEAD^) &&\n> +\tgit -C mw_dir_clone checkout HEAD^ &&\n> +\tgit -C mw_dir checkout HEAD^ &&\n\nwould be more preferrable.\n\n>  \ttest_path_is_file mw_dir_clone/Foo.txt &&\n>  \ttest_cmp mw_dir_clone/Foo.txt mw_dir/Foo.txt\n>  '\n\nThanks.\n"}]}