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

[PATCH 3/3] test for simple submodule checkout support

From
Sskimo@liacs.nl <skimo@liacs.nl>
Date
May 25, 2007, 21:07 UTC
Message-ID
<1180127233176-git-send-email-skimo@liacs.nl>
In-Reply-To
<1180127233729-git-send-email-skimo@liacs.nl>
From: Martin Waitz <tali@admingilde.org>
Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
---
 t/t3041-subprojects-checkout.sh |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100755 t/t3041-subprojects-checkout.sh
diff --git a/t/t3041-subprojects-checkout.sh b/t/t3041-subprojects-checkout.sh
new file mode 100755
index 0000000..4b3cea9
--- /dev/null
+++ b/t/t3041-subprojects-checkout.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+test_description='submodule checkout'
+. ./test-lib.sh
+
+test_expect_success 'submodule creation' \
+    '(mkdir A && cd A &&
+      git init &&
+      echo 1 > a &&
+      git add a &&
+      git commit -m "create submodule" || exit $? )'
+
+test_expect_success 'Super module creation' \
+    'git add A &&
+     git commit -m "supermodule creation" &&
+     git branch one'
+
+test_expect_success 'submodule change' \
+    '(cd A &&
+      echo 2 > a &&
+      git add a &&
+      git commit -m "create submodule" || exit $? )'
+
+test_expect_success 'supermodule change' \
+    'git add A &&
+     git commit -m "supermodule creation"'
+
+test_expect_success 'supermodule switching branch' \
+    'git checkout one &&
+     echo 1 > expected &&
+     git diff expected A/a'
+
+test_expect_success 'supermodule reset' \
+    'git reset --hard master &&
+     echo 2 > expected &&
+     git diff expected A/a'
+
+
+test_done
-- 
1.5.2.838.gbeec
Previous: Junio C Hamano
Message 7 of 7 in “run-command: optionally clear git environment”
  1. 1/3 run-command: optionally clear git environmentskimo@liacs.nl, May 25, 2007
  2. 2/3 entry.c: checkout available submodulesskimo@liacs.nl, May 25, 2007
  3. Martin WaitzMay 25, 2007
  4. Sven VerdoolaegeMay 25, 2007
  5. Martin WaitzMay 25, 2007
  6. Junio C HamanoMay 25, 2007
  7. 3/3 test for simple submodule checkout supportskimo@liacs.nl, May 25, 2007

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.