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

Re: [PATCH] git mv: do not keep slash in `git mv dir non-existing-dir/`

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2016, 16:18 UTC
Message-ID
<xmqqlh0bxk8d.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.20.1608051754080.5786@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Please note that t7001 *specifically* tests for the opposite of what you
> want, then ;-)
Yes, I know.  I am torn.

It seems "mv A B/" (not "git mv") when B does not exist does the same "wrong" thing, so the existing behaviour is at least consistent with the command line tools on Linux, and more importantly, existing users of "git mv A B/" have expected it to ignore the trailing slash for a long time, so let's not change the expected behaviour.

Thanks.
Previous: Johannes Schindelin
Message 4 of 4 in “git mv: do not keep slash in `git mv dir non-existing-dir/`”
  1. git mv: do not keep slash in `git mv dir non-existing-dir/`Johannes Schindelin, Aug 5, 2016
  2. Junio C HamanoAug 5, 2016
  3. Johannes SchindelinAug 5, 2016
  4. Junio C HamanoAug 5, 2016

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.