Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-05-14 18:29:49 +0400
committerJunio C Hamano <gitster@pobox.com>2008-05-16 03:52:31 +0400
commitd775734c40afed216160437c59a45c93bdf28689 (patch)
tree9767b442e6052ca8a1981d9ef8d710c1adb2116e /t/t9200-git-cvsexportcommit.sh
parent57e0e3ebd6fac2bf5fe46fd946dae6129b07f474 (diff)
cvsexportcommit: introduce -W for shared working trees (between Git and CVS)
If you have a CVS checkout, it is easy to import the CVS history by calling "git cvsimport". However, interacting with the CVS repository using "git cvsexportcommit" was cumbersome, since that script assumes separate working directories for Git and CVS. Now, you can call cvsexportcommit with the -W option. This will automatically discover the GIT_DIR, and it will check out the parent commit before exporting the commit. The intended workflow is this: $ CVSROOT=$URL cvs co module $ cd module $ git cvsimport hack, hack, hack, making two commits, cleaning them up using rebase -i. $ git cvsexportcommit -W -c -p -u HEAD^ $ git cvsexportcommit -W -c -p -u HEAD Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9200-git-cvsexportcommit.sh')
-rwxr-xr-xt/t9200-git-cvsexportcommit.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 42b144b1b3..b1dc32d056 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -297,4 +297,21 @@ test_expect_success 'commit a file with leading spaces in the name' '
'
+test_expect_success 'use the same checkout for Git and CVS' '
+
+ (mkdir shared &&
+ cd shared &&
+ unset GIT_DIR &&
+ cvs co . &&
+ git init &&
+ git add " space" &&
+ git commit -m "fake initial commit" &&
+ echo Hello >> " space" &&
+ git commit -m "Another change" " space" &&
+ git cvsexportcommit -W -p -u -c HEAD &&
+ grep Hello " space" &&
+ git diff-files)
+
+'
+
test_done