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

[PATCH 2/2] t1500: more 'git rev-parse --git-dir' tests

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Feb 14, 2009, 16:16 UTC
Message-ID
<1234628189-3635-2-git-send-email-szeder@ira.uka.de>
In-Reply-To
<1234628189-3635-1-git-send-email-szeder@ira.uka.de>

Extend t1500 with tests of 'git rev-parse --git-dir' when invoked from other directories of the repository or the work tree.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
  In a separate commit to clearly indicate which test was moved and
  which ones are new.
 t/t1500-rev-parse.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh
index 186792e..48ee077 100755
--- a/t/t1500-rev-parse.sh
+++ b/t/t1500-rev-parse.sh
@@ -37,17 +37,17 @@ test_rev_parse() {
 
 ROOT=$(pwd)
 
-test_rev_parse toplevel false false true ''
+test_rev_parse toplevel false false true '' .git
 
 cd .git || exit 1
-test_rev_parse .git/ false true false ''
+test_rev_parse .git/ false true false '' .
 cd objects || exit 1
 test_rev_parse .git/objects/ false true false '' "$ROOT/.git"
 cd ../.. || exit 1
 
 mkdir -p sub/dir || exit 1
 cd sub/dir || exit 1
-test_rev_parse subdirectory false false true sub/dir/
+test_rev_parse subdirectory false false true sub/dir/ "$ROOT/.git"
 cd ../.. || exit 1
 
 git config core.bare true
-- 
1.6.2.rc0.81.g79856
Previous: SZEDER GáborNext: Junio C Hamano
Message 2 of 3 in “Move 'rev-parse --git-dir' test to t1500”
  1. 1/2 Move 'rev-parse --git-dir' test to t1500SZEDER Gábor, Feb 14, 2009
  2. 2/2 t1500: more 'git rev-parse --git-dir' testsSZEDER Gábor, Feb 14, 2009
  3. Junio C HamanoFeb 15, 2009

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.