Re: [PATCH v2 1/2] perf: add function to setup a fresh test repo

2 messages, 2 authors, 2017-05-11 · open the first message on its own page

Re: [PATCH v2 1/2] perf: add function to setup a fresh test repo

From: Junio C Hamano <hidden>
Date: 2017-05-11 09:55:48

Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Thu, May 11, 2017 at 1:30 AM, Jonathan Nieder [off-list ref] wrote:
quoted
Hi,

Ęvar Arnfjörš Bjarmason wrote:

[...]
quoted
 # call at least one of these to establish an appropriately-sized repository
+test_perf_fresh_repo () {
+     repo="${1:-$TRASH_DIRECTORY}"
+     "$MODERN_GIT" init -q "$repo" &&
+     cd "$repo" &&
+     test_perf_do_repo_symlink_config_
+}
Unlike the other two variants, wouldn't this leave the cwd inside the
new repo?

In other words, I wonder if the commands starting with the 'cd' should
be in a subshell.

Thanks and hope that helps,
Yup, I'll fix that. Thanks for the review & also on the other patch.
Will send a v3 with these issues fixed.
Hmph, does v3 actually have this change?

Re: [PATCH v2 1/2] perf: add function to setup a fresh test repo

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2017-05-11 09:59:37

On Thu, May 11, 2017 at 11:55 AM, Junio C Hamano [off-list ref] wrote:
Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted
On Thu, May 11, 2017 at 1:30 AM, Jonathan Nieder [off-list ref] wrote:
quoted
Hi,

Ęvar Arnfjörš Bjarmason wrote:

[...]
quoted
 # call at least one of these to establish an appropriately-sized repository
+test_perf_fresh_repo () {
+     repo="${1:-$TRASH_DIRECTORY}"
+     "$MODERN_GIT" init -q "$repo" &&
+     cd "$repo" &&
+     test_perf_do_repo_symlink_config_
+}
Unlike the other two variants, wouldn't this leave the cwd inside the
new repo?

In other words, I wonder if the commands starting with the 'cd' should
be in a subshell.

Thanks and hope that helps,
Yup, I'll fix that. Thanks for the review & also on the other patch.
Will send a v3 with these issues fixed.
Hmph, does v3 actually have this change?
Nope, sent v4 to fix it, sorry:
https://public-inbox.org/git/20170511094108.8756-1-avarab@gmail.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help