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

[PATCH] Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR

From
Johan Herland <johan@herland.net>
Date
Feb 13, 2008, 03:11 UTC
Message-ID
<200802130411.22093.johan@herland.net>
In-Reply-To
<200802122141.35594.robin.rosenberg.lists@dewire.com>

The testcase verifies that 'git cvsexportcommit' functions correctly when the '-w' option is used, and GIT_DIR is set to a relative path (e.g. '.').

Signed-off-by: Johan Herland <johan@herland.net>
---
On Tuesday 12 February 2008, Robin Rosenberg wrote:
> Looks ok. Something for the test suite?
Like this?
Have fun! :)
...Johan
 t/t9200-git-cvsexportcommit.sh |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index a15222c..5dae88c 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -2,7 +2,7 @@
 #
 # Copyright (c) Robin Rosenberg
 #
-test_description='CVS export comit. '
+test_description='Test export of commits to CVS'
 
 . ./test-lib.sh
 
@@ -246,4 +246,20 @@ test_expect_success \
 	;;
 esac
 
+test_expect_success \
+     '-w option should work with relative GIT_DIR' \
+     'mkdir W &&
+      echo foobar >W/file1.txt &&
+      echo bazzle >W/file2.txt &&
+      git add W/file1.txt &&
+      git add W/file2.txt &&
+      git commit -m "More updates" &&
+      id=$(git rev-list --max-count=1 HEAD) &&
+      (cd "$GIT_DIR" &&
+      GIT_DIR=. git cvsexportcommit -w "$CVSWORK" -c $id &&
+      check_entries "$CVSWORK/W" "file1.txt/1.1/|file2.txt/1.1/" &&
+      diff -u "$CVSWORK/W/file1.txt" ../W/file1.txt &&
+      diff -u "$CVSWORK/W/file2.txt" ../W/file2.txt
+      )'
+
 test_done
-- 
1.5.4.2.g41ac4
Previous: Robin RosenbergNext: Junio C Hamano
Message 6 of 8 in “Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR”
  1. Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIRJohan Herland, Feb 11, 2008
  2. Junio C HamanoFeb 11, 2008
  3. Robin RosenbergFeb 11, 2008
  4. Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIRJohan Herland, Feb 11, 2008
  5. Robin RosenbergFeb 12, 2008
  6. Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIRJohan Herland, Feb 13, 2008
  7. Junio C HamanoFeb 13, 2008
  8. Jakub NarebskiFeb 13, 2008

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.