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

Re: [PATCH] git-mv: fully detect 'directory moved into itself'

From
Junio C Hamano <junkio@cox.net>
Date
Nov 28, 2005, 09:24 UTC
Message-ID
<7vbr05xgzp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200511281015.15188.Josef.Weidendorfer@gmx.de>
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
Show 15 quoted lines
> This is a corrected version.
>
> On Monday 28 November 2005 07:54, Matthias Urlichs wrote:
>> Hi, Josef Weidendorfer wrote:
>> 
>> > +    if (($bad eq "") && ($dst =~ /^$src\//)) {
>> 
>> That should be
>> 
>> > +    if (($bad eq "") && ($dst =~ /^\Q$src\E\//)) {
>> 
>> otherwise you will mistakenly match "foo-bar" with "foo.bar".
>
> Ah, thanks.
> You never end learning.
Why not use $safesrc you already have for this exact purpose?
Previous: Josef Weidendorfer
Message 4 of 4 in “git-mv: fully detect 'directory moved into itself'”
  1. Josef WeidendorferNov 27, 2005
  2. Matthias UrlichsNov 28, 2005
  3. git-mv: fully detect 'directory moved into itself'Josef Weidendorfer, Nov 28, 2005
  4. Junio C HamanoNov 28, 2005

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.