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

Re: [EXTERNAL] [PATCH v2 1/1] git mv foo FOO ; git mv foo bar gave an assert

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 1, 2021, 21:47 UTC
Message-ID
<xmqq5z2ao8am.fsf@gitster.c.googlers.com>
In-Reply-To
<BYAPR21MB1158CDD04067369BB367474CE09A9@BYAPR21MB1158.namprd21.prod.outlook.com>
Dan Moseley <Dan.Moseley@microsoft.com> writes:
> Thank you Thorsten. This makes sense to me. Do you want to add a test? 
> I believe this is what I had in my original patch, that worked pretty well:

Would this succeed unconditionally on all platforms, or only relevant on case-insensitive filesystems? Lack of any prerequisite on a new test is a good thing (if it is correct), but the description of the change talked about case insensitivity, so ...

Show 19 quoted lines
> diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
> index 63d5f41a12..5c7fee9bd8 100755
> --- a/t/t7001-mv.sh
> +++ b/t/t7001-mv.sh
> @@ -152,6 +152,14 @@ test_expect_success \
>      'move into "."' \
>      'git mv path1/path2/ .'
>
> +test_expect_success \
> +    'fail to move file already in index under different cased name' \
> +    'echo 1 > foo &&
> +     git add foo &&
> +     git commit -m add_file -- foo &&
> +     git mv foo FOO &&
> +     test_expect_code 128 git mv foo BAR'
> +
>  test_expect_success "Michael Cassar's test case" '
>         rm -fr .git papers partA &&
>         git init &&
Previous: Dan Moseley
Message 13 of 13 in “git-mv: fix git mv bug with case insensitive fs”
  1. git-mv: fix git mv bug with case insensitive fsDan Moseley, Dec 29, 2020
  2. Torsten BögershausenDec 31, 2020
  3. Junio C HamanoJan 6, 2021
  4. 1/1 git mv foo FOO ; git mv foo bar gave an asserttboegi@web.de, Jan 6, 2021
  5. Junio C HamanoJan 6, 2021
  6. 1/1 git mv foo FOO ; git mv foo bar gave an asserttboegi@web.de, Mar 1, 2021
  7. Junio C HamanoMar 1, 2021
  8. Chris TorekMar 1, 2021
  9. Junio C HamanoMar 1, 2021
  10. 1/1 git mv foo FOO ; git mv foo bar gave an asserttboegi@web.de, Mar 1, 2021
  11. Junio C HamanoMar 1, 2021
  12. Dan MoseleyMar 1, 2021
  13. Junio C HamanoMar 1, 2021

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.