git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: git@vger.kernel.org, pclouds@gmail.com, Jens.Lehmann@web.de,
	jacob.keller@gmail.com
Subject: Re: [PATCH 2/4] submodule: fix recursive execution from non root directory
Date: Fri, 25 Mar 2016 09:46:28 -0700	[thread overview]
Message-ID: <xmqqtwju4iaj.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1458862468-12460-3-git-send-email-sbeller@google.com> (Stefan Beller's message of "Thu, 24 Mar 2016 16:34:26 -0700")

Stefan Beller <sbeller@google.com> writes:

> Most times that directory doesn't exist and we error out. Fix this bug
> by clearing wt_prefix, such that any recursive instances of will assume
> to operate from the respective root of the respective submodule.

As long as the recursive instances do not take any filenames and
pathspecs that needs adjustment with respect to the prefix, this
would be an OK change; I am not sure if that precondition holds,
though.

Thanks.

>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
>  git-submodule.sh | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/git-submodule.sh b/git-submodule.sh
> index 536ba68..6b18a03 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -827,6 +827,7 @@ Maybe you want to use 'update --init'?")"
>  			(
>  				prefix="$(relative_path $prefix$sm_path)/"
>  				clear_local_git_env
> +				wt_prefix=
>  				cd "$sm_path" &&
>  				eval cmd_update
>  			)
> @@ -1159,6 +1160,7 @@ cmd_status()
>  			(
>  				prefix="$displaypath/"
>  				clear_local_git_env
> +				wt_prefix=
>  				cd "$sm_path" &&
>  				eval cmd_status
>  			) ||
> @@ -1240,6 +1242,7 @@ cmd_sync()
>  
>  				if test -n "$recursive"
>  				then
> +					wt_prefix=
>  					eval cmd_sync
>  				fi
>  			)

  parent reply	other threads:[~2016-03-25 16:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 23:34 [PATCHv2 0/4] submodule helper: cleanup prefix passing Stefan Beller
2016-03-24 23:34 ` [PATCH 1/4] submodule: fix recursive path printing from non root directory Stefan Beller
2016-03-24 23:38   ` Jacob Keller
2016-03-24 23:44     ` Stefan Beller
2016-03-25 16:43   ` Junio C Hamano
2016-03-25 16:54     ` Stefan Beller
2016-03-24 23:34 ` [PATCH 2/4] submodule: fix recursive execution " Stefan Beller
2016-03-24 23:41   ` Jacob Keller
2016-03-25 16:46   ` Junio C Hamano [this message]
2016-03-25 17:27     ` Stefan Beller
2016-03-24 23:34 ` [PATCH 3/4] submodule--helper list: lose the extra prefix option Stefan Beller
2016-03-24 23:44   ` Jacob Keller
2016-03-25  6:28   ` Junio C Hamano
2016-03-25 16:02     ` Junio C Hamano
2016-03-25 17:25       ` Junio C Hamano
2016-03-25 17:31         ` Stefan Beller
2016-03-25 16:49     ` Stefan Beller
2016-03-25 17:01       ` Junio C Hamano
2016-03-25 17:05         ` Stefan Beller
2016-03-25 18:32           ` Junio C Hamano
2016-03-24 23:34 ` [PATCH 4/4] submodule: add more tests for recursive submodule behavior Stefan Beller
2016-03-25  0:25   ` Eric Sunshine
2016-03-25  0:33     ` Stefan Beller

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=xmqqtwju4iaj.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.com \
    --cc=pclouds@gmail.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).