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

Re: [PATCH] mingw: align symlinks-related rmdir() behavior with Linux

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2021, 20:03 UTC
Message-ID
<xmqqo8ak51mt.fsf@gitster.g>
In-Reply-To
<pull.1008.git.1627586493659.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 7 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> When performing a rebase, rmdir() is called on the folder .git/logs. On
> Unix rmdir() exits without deleting anything in case .git/logs is a
> symbolic link but the equivalent functions on Windows (_rmdir, _wrmdir
> and RemoveDirectoryW) do not behave the same and remove the folder if it
> is symlinked even if it is not empty.

The distinction is understandable, and I can see this justifies the patch really nicely.

It is curious why "rebase" causes rmdir on the reflog hierarchy, though. It is also unclear if "rebase" is special in having this behaviour (and if so why), or just an example the problem was observed with and other subcommands may benefit from the same fix.

Will queue with authorship corrected (as you reported in the follow-up).

Thanks.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 7 in “mingw: align symlinks-related rmdir() behavior with Linux”
  1. mingw: align symlinks-related rmdir() behavior with LinuxJohannes Schindelin via GitGitGadget, Jul 29, 2021
  2. Johannes SchindelinJul 29, 2021
  3. Junio C HamanoJul 29, 2021
  4. Johannes SchindelinAug 2, 2021
  5. Eric SunshineJul 29, 2021
  6. Johannes SchindelinAug 2, 2021
  7. mingw: align symlinks-related rmdir() behavior with LinuxJohannes Schindelin via GitGitGadget, Aug 2, 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.