From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: git-mv: fully detect 'directory moved into itself'
Date: Sun, 27 Nov 2005 22:06:42 +0100 [thread overview]
Message-ID: <200511272206.43113.Josef.Weidendorfer@gmx.de> (raw)
This gives a better error message when trying to move a directory
into some subdirectory of itself; ie. no real bug fix: renaming
already failed before, but with a strange "invalid argument".
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---
git-mv.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
applies-to: 5d83477de7a407ab0ef183c6676114e1a507cf86
29b01f820bf24c4b697765a2a117c880a730b205
diff --git a/git-mv.perl b/git-mv.perl
index ac19876..8d294d6 100755
--- a/git-mv.perl
+++ b/git-mv.perl
@@ -108,7 +108,7 @@ while(scalar @srcArgs > 0) {
}
}
- if (($bad eq "") && ($src eq $dstDir)) {
+ if (($bad eq "") && ($dst =~ /^$src\//)) {
$bad = "can not move directory '$src' into itself";
}
---
0.99.9.GIT
next reply other threads:[~2005-11-27 21:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-27 21:06 Josef Weidendorfer [this message]
2005-11-28 6:54 ` git-mv: fully detect 'directory moved into itself' Matthias Urlichs
2005-11-28 9:15 ` [PATCH] " Josef Weidendorfer
2005-11-28 9:24 ` Junio C Hamano
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=200511272206.43113.Josef.Weidendorfer@gmx.de \
--to=josef.weidendorfer@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