Re: [PATCH v7 09/10] submodule: support reading .gitmodules when it's not in the working tree
From: Antonio Ospite <hidden>
Date: 2018-10-30 11:17:30
On Tue, 30 Oct 2018 10:57:09 +0100 (STD) Johannes Schindelin [off-list ref] wrote:
Hi Antonio,
Hi Johannes,
On Thu, 25 Oct 2018, Antonio Ospite wrote:quoted
diff --git a/t/t7418-submodule-sparse-gitmodules.sh b/t/t7418-submodule-sparse-gitmodules.sh new file mode 100755
[...]
quoted hunk ↗ jump to hunk
quoted
+ 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. https://git-for-windows.visualstudio.com/git/_build/results?buildId=22913&view=logs
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? Thank you, Antonio 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. -- Antonio Ospite https://ao2.it https://twitter.com/ao2it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing?