From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, junkio@cox.net
Subject: [PATCH] Extend testing git-mv for renaming of subdirectories
Date: Wed, 26 Jul 2006 15:44:08 +0200 [thread overview]
Message-ID: <200607261544.08435.Josef.Weidendorfer@gmx.de> (raw)
In-Reply-To: <Pine.LNX.4.63.0607260348130.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---
On Wednesday 26 July 2006 03:52, Johannes Schindelin wrote:
> There is no test for it, and I am quite certain the old script
> doesn't do it either: git-mv some_tracked_dir/ there/ will
> not work. t7001-mv passes, though.
Hmm... Renaming full subtrees worked since the old git-rename days.
I just checked it, and it works fine.
My bad, that there was no test for this, so what about this?
Josef
t/t7001-mv.sh | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 811a479..9270a41 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -38,4 +38,28 @@ test_expect_success \
'git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path1/COPYING.+path0/COPYING"'
+test_expect_success \
+ 'adding another file' \
+ 'cp ../../README path0/README &&
+ git-add path0/README &&
+ git-commit -m add2 -a'
+
+test_expect_success \
+ 'moving whole subdirectory' \
+ 'git-mv path0 path2'
+
+test_expect_success \
+ 'commiting the change' \
+ 'git-commit -m dir-move -a'
+
+test_expect_success \
+ 'checking the commit' \
+ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path0/COPYING.+path2/COPYING" &&
+ git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path0/README.+path2/README"'
+
test_done
+
--
1.4.2.rc1.g791e
next prev parent reply other threads:[~2006-07-26 13:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 1:52 [PATCH] Make git-mv a builtin Johannes Schindelin
2006-07-26 5:47 ` Junio C Hamano
2006-07-26 10:19 ` Johannes Schindelin
2006-07-26 13:44 ` Josef Weidendorfer [this message]
2006-07-26 15:22 ` [PATCH] Extend testing git-mv for renaming of subdirectories Johannes Schindelin
2006-07-26 16:02 ` Josef Weidendorfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200607261544.08435.Josef.Weidendorfer@gmx.de \
--to=josef.weidendorfer@gmx.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox