From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Peter Kaestle <peter.kaestle@nokia.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: Re: [RFC 2/2] Revert "submodule.c: fetch in submodules git directory instead of in worktree"
Date: Tue, 10 Nov 2020 16:08:17 +0100 (CET) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.2011101607250.18437@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <1604910829-49109-3-git-send-email-peter.kaestle@nokia.com>
Hi Peter,
On Mon, 9 Nov 2020, Peter Kaestle wrote:
> This reverts commit a62387b3fc9f5aeeb04a2db278121d33a9caafa7 and sets
> the "fetching a superproject containing an uninitialized sub/sub
> project" testcase to expect success.
Just like the cover letter, this commit message might be technically
correct, but leaves me (and probably every future reader) wondering _why_
you would want this change.
Maybe this can be improved?
Ciao,
Dscho
>
> Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com>
> ---
> submodule.c | 14 ++++----------
> t/t5526-fetch-submodules.sh | 2 +-
> 2 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/submodule.c b/submodule.c
> index b3bb59f..eef5204e 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -499,12 +499,6 @@ void prepare_submodule_repo_env(struct strvec *out)
> DEFAULT_GIT_DIR_ENVIRONMENT);
> }
>
> -static void prepare_submodule_repo_env_in_gitdir(struct strvec *out)
> -{
> - prepare_submodule_repo_env_no_git_dir(out);
> - strvec_pushf(out, "%s=.", GIT_DIR_ENVIRONMENT);
> -}
> -
> /*
> * Initialize a repository struct for a submodule based on the provided 'path'.
> *
> @@ -1455,8 +1449,8 @@ static int get_next_submodule(struct child_process *cp,
> if (task->repo) {
> struct strbuf submodule_prefix = STRBUF_INIT;
> child_process_init(cp);
> - cp->dir = task->repo->gitdir;
> - prepare_submodule_repo_env_in_gitdir(&cp->env_array);
> + cp->dir = task->repo->worktree;
> + prepare_submodule_repo_env(&cp->env_array);
> cp->git_cmd = 1;
> if (!spf->quiet)
> strbuf_addf(err, _("Fetching submodule %s%s\n"),
> @@ -1505,9 +1499,9 @@ static int get_next_submodule(struct child_process *cp,
> spf->prefix, task->sub->path);
>
> child_process_init(cp);
> - prepare_submodule_repo_env_in_gitdir(&cp->env_array);
> + prepare_submodule_repo_env(&cp->env_array);
> cp->git_cmd = 1;
> - cp->dir = task->repo->gitdir;
> + cp->dir = task->repo->worktree;
>
> strvec_init(&cp->args);
> strvec_pushv(&cp->args, spf->args.v);
> diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
> index 9fbd481..236e26a 100755
> --- a/t/t5526-fetch-submodules.sh
> +++ b/t/t5526-fetch-submodules.sh
> @@ -729,7 +729,7 @@ add_commit_push()
> git -C "$dir" push
> }
>
> -test_expect_failure 'fetching a superproject containing an uninitialized sub/sub project' '
> +test_expect_success 'fetching a superproject containing an uninitialized sub/sub project' '
> # does not depend on any previous test setups
>
> for repo in outer middle inner
> --
> 2.6.2
>
>
prev parent reply other threads:[~2020-11-10 15:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 14:23 [REGRESSION FIX 0/2] Handling regression introduced by a62387b Peter Kaestle
2020-11-03 14:23 ` [REGRESSION FIX 1/2] submodules: test for fetch of non-init subsub-repo Peter Kaestle
2020-11-03 14:23 ` [REGRESSION FIX 2/2] Revert "submodule.c: fetch in submodules git directory instead of in worktree" Peter Kaestle
2020-11-09 8:33 ` [RFC 0/2] Handling regression introduced by a62387b Peter Kaestle
2020-11-09 8:33 ` [RFC 1/2] submodules: test for fetch of non-init subsub-repo Peter Kaestle
2020-11-09 17:52 ` Junio C Hamano
2020-11-11 12:45 ` Peter Kästle
2020-11-11 17:22 ` Philip Oakley
2020-11-12 16:00 ` [RFCv2] submodules: fix of regression on fetching " Peter Kaestle
2020-11-11 17:35 ` [RFC 1/2] submodules: test for fetch " Philippe Blain
2020-11-11 19:27 ` Junio C Hamano
2020-11-11 19:24 ` Philippe Blain
2020-11-09 8:33 ` [RFC 2/2] Revert "submodule.c: fetch in submodules git directory instead of in worktree" Peter Kaestle
2020-11-10 15:08 ` Johannes Schindelin [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=nycvar.QRO.7.76.6.2011101607250.18437@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peter.kaestle@nokia.com \
--cc=sbeller@google.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).