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

Re: glob escaping doesn't work with git mv

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 7, 2014, 02:10 UTC
Message-ID
<CACsJy8APd6JH=32eWqK0m3e9bEWcrme3xZUewCyQxv08w=CyUQ@mail.gmail.com>
In-Reply-To
<CA+cJFMm_vJwk=D0dkhEvfXwWk1S74hONb_g7O9W0iMZD3yAdLg@mail.gmail.com>
On Thu, Aug 7, 2014 at 8:52 AM, Alan Grover <alan.grover@gmail.com> wrote:
Show 7 quoted lines
> Since we can do git add file\*, I tried:
>
> $ git mv file\* newdir
>
> I get a 'bad source, source=file* destination=file*' error. It seems
> to be looking for a file named 'file*' rather than performing glob
> expansion.

This is a known problem (to me at least). Source path processing in git-mv is a bit complicated and it scared me away from converting to using pathspec (which supports globbing and stuff). But perhaps if I just expand pathspec and feed the final path list to git-mv (pretty much like how shells expand glob) then it probably works..

-- 
Duy
Previous: Alan Grover
Message 2 of 2 in “glob escaping doesn't work with git mv”
  1. Alan GroverAug 7, 2014
  2. Duy NguyenAug 7, 2014

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.