Re: [PATCH v7 09/10] submodule: support reading .gitmodules when it's not in the working tree
- Date: Tue, 30 Oct 2018 12:16:30 +0100
- From: Antonio Ospite <ao2@xxxxxx>
- Subject: Re: [PATCH v7 09/10] submodule: support reading .gitmodules when it's not in the working tree
On Tue, 30 Oct 2018 10:57:09 +0100 (STD)
Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> Hi Antonio,
> On Thu, 25 Oct 2018, Antonio Ospite wrote:
> > diff --git a/t/t7418-submodule-sparse-gitmodules.sh b/t/t7418-submodule-sparse-gitmodules.sh
> > new file mode 100755
> > + echo "$PWD/submodule" >expect &&
> Would you mind squashing this fixup in?
> -- snip --
> diff --git a/t/t7418-submodule-sparse-gitmodules.sh b/t/t7418-submodule-sparse-gitmodules.sh
> index 21a86b89c6cb..3f7f27188313 100755
> --- a/t/t7418-submodule-sparse-gitmodules.sh
> +++ b/t/t7418-submodule-sparse-gitmodules.sh
> @@ -55,7 +55,7 @@ test_expect_success 'initialising submodule when the gitmodules config is not ch
> test_must_fail git -C super config submodule.submodule.url &&
> git -C super submodule init &&
> git -C super config submodule.submodule.url >actual &&
> - echo "$PWD/submodule" >expect &&
> + echo "$(pwd)/submodule" >expect &&
> test_cmp expect actual
> -- snap --
> On Windows, `$PWD` and `$(pwd)` are *not* synonymous. The former
> reflects the "Unix path" which is understood by the Bash script (and
> only by the Bash script, *not* by `git.exe`!) while the latter refers to
> the actual Windows path.
I see, this is also mentioned in t/README, I had overlooked that part.
Thank you for reporting.
> Without this fix, your new test case will fail on Windows all the time,
> see e.g.
Junio, what is the plan for 'ao/submodule-wo-gitmodules-checked-out'?
I see it's not in next yet; do you want me to resend the whole series
with this fixup in or would it be less overhead for you to apply it
directly to patch 9/10 from v7 of the series?
P.S. I was wondering if it is worth having patchset versions mentioned
somewhere in pu/, maybe in merge commits if not in branch names?
Or at least in whats-cooking.txt next to the date.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?