git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/1] submodule: Fix 'submodule status' when called from a subdirectory

From
Manish Goregaokar via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 25, 2019, 04:15 UTC
Message-ID
<pull.472.v3.git.1574655344.gitgitgadget@gmail.com>
In-Reply-To
<pull.472.v2.git.1574582473.gitgitgadget@gmail.com>
Updated with an improved test.
Manish Goregaokar (1):
  submodule: fix 'submodule status' when called from a subdirectory
 builtin/submodule--helper.c |  3 ++-
 t/t7400-submodule-basic.sh  | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
base-commit: 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-472%2FManishearth%2Fsubdir-status-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-472/Manishearth/subdir-status-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/472
Range-diff vs v2:
 1:  e4c932bd09 ! 1:  8dcea6b399 submodule: fix 'submodule status' when called from a subdirectory
     @@ -41,18 +41,21 @@
      +	test_when_finished "rmdir addtest/subdir" &&
      +	(
      +		cd addtest &&
     -+		git status > /tmp/foo &&
     -+		git submodule status | awk "{print \$1}" >expected &&
      +		mkdir subdir &&
     ++		git submodule status >output &&
     ++		awk "{print \$1}" <output >expect &&
      +		cd subdir &&
     -+		git submodule status | awk "{print \$1}" >../actual &&
     -+		test_cmp ../expected ../actual &&
     -+		git -C ../submod checkout @^ &&
     -+		git submodule status | awk "{print \$1}" >../actual2 &&
     ++		git submodule status >../output &&
     ++		awk "{print \$1}" <../output >../actual &&
     ++		test_cmp ../expect ../actual &&
     ++		git -C ../submod checkout HEAD^ &&
     ++		git submodule status >../output &&
     ++		awk "{print \$1}" <../output >../actual2 &&
      +		cd .. &&
     -+		git submodule status | awk "{print \$1}" >expected2 &&
     -+		test_cmp actual2 expected2 &&
     -+		test_must_fail test_cmp actual actual2
     ++		git submodule status >output &&
     ++		awk "{print \$1}" <output >expect2 &&
     ++		test_cmp actual2 expect2 &&
     ++		! test_cmp actual actual2
      +	)
      +'
      +
-- 
gitgitgadget
Previous: Manish GoregaokarNext: Manish Goregaokar via GitGitGadget
Message 8 of 11 in “submodule: Fix 'submodule status' when called from a subdirectory”
  1. 0/1 submodule: Fix 'submodule status' when called from a subdirectoryManish Goregaokar via GitGitGadget, Nov 23, 2019
  2. 1/1 submodule: Fix 'submodule status' when called from a subdirectoryManish Goregaokar via GitGitGadget, Nov 23, 2019
  3. Junio C HamanoNov 24, 2019
  4. 0/1 submodule: Fix 'submodule status' when called from a subdirectoryManish Goregaokar via GitGitGadget, Nov 24, 2019
  5. 1/1 submodule: fix 'submodule status' when called from a subdirectoryManish Goregaokar via GitGitGadget, Nov 24, 2019
  6. Junio C HamanoNov 25, 2019
  7. Manish GoregaokarNov 25, 2019
  8. 0/1 submodule: Fix 'submodule status' when called from a subdirectoryManish Goregaokar via GitGitGadget, Nov 25, 2019
  9. 1/1 submodule: fix 'submodule status' when called from a subdirectoryManish Goregaokar via GitGitGadget, Nov 25, 2019
  10. Junio C HamanoNov 25, 2019
  11. Manish GoregaokarNov 25, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.