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

Re: [PATCH] Fix safe_create_leading_directories() for Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 2, 2014, 19:55 UTC
Message-ID
<xmqqtxdmp39a.fsf@gitster.dls.corp.google.com>
In-Reply-To
<alpine.DEB.1.00.1401021826120.1191@s15462909.onlinehome-server.info>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 12 quoted lines
> Hi,
>
> On Thu, 2 Jan 2014, Sebastian Schuberth wrote:
>
>> See https://github.com/msysgit/git/pull/80.
>
> Thanks Sebastian!
>
> However, since the git.git project is not comfortable with the concept of
> pull requests (which is why you submitted this patch via mail), I believe
> that we have to explain the rationale in the commit message. So here goes
> my attempt:

Thanks; the conclusion is correct --- you need a good commit message in the recorded history. That does not have anything to do with integrating with pulling from subsystem maintainers, which we regularly do.

Show 5 quoted lines
> On Linux, we can get away with assuming that the directory separator is a
> forward slash, but that is wrong in general. For that purpose, the
> is_dir_sep() function was introduced a long time ago. By using it in
> safe_create_leading_directories(), we proof said function for use on
> platforms where the directory separator is different from Linux'.

Perhaps with s|Linux|POSIX|, but more importantly, was there a specific error scenario that triggered this change?

My quick reading of "git grep" suggests that the callsites of this function all assume that they are to use slashes as directory separators, and it may be that it is a bug in the specific caller that throws a backslash-separated paths to it.

Previous: Sebastian SchuberthNext: Johannes Schindelin
Message 10 of 22 in “Fix safe_create_leading_directories() for Windows”
  1. Fix safe_create_leading_directories() for WindowsSebastian Schuberth, Jan 2, 2014
  2. Johannes SchindelinJan 2, 2014
  3. Sebastian SchuberthJan 2, 2014
  4. John KeepingJan 2, 2014
  5. Sebastian SchuberthJan 2, 2014
  6. Johannes SchindelinJan 2, 2014
  7. Erik Faye-LundJan 7, 2014
  8. Johannes SchindelinJan 7, 2014
  9. Sebastian SchuberthJan 7, 2014
  10. Junio C HamanoJan 2, 2014
  11. Johannes SchindelinJan 2, 2014
  12. Sebastian SchuberthJan 2, 2014
  13. Fix safe_create_leading_directories() for WindowsSebastian Schuberth, Jan 2, 2014
  14. Johannes SchindelinJan 2, 2014
  15. Junio C HamanoJan 2, 2014
  16. Junio C HamanoJan 2, 2014
  17. Junio C HamanoJan 2, 2014
  18. Junio C HamanoJan 2, 2014
  19. Johannes SchindelinJan 2, 2014
  20. Sebastian SchuberthJan 19, 2014
  21. Sebastian SchuberthJan 19, 2014
  22. Junio C HamanoJan 21, 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.