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

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

From
Matthias Urlichs <smurf@smurf.noris.de>
Date
Nov 28, 2005, 06:54 UTC
Message-ID
<pan.2005.11.28.06.54.32.809941@smurf.noris.de>
In-Reply-To
<200511272206.43113.Josef.Weidendorfer@gmx.de>
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".
-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
If people drank ink instead of Schlitz, they'd be better off.
		-- Edward E. Hippensteel

[What brand of ink?  Ed.]
Previous: Josef WeidendorferNext: Josef Weidendorfer
Message 2 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.