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

Re: [PATCH] Fix safe_create_leading_directories() for Windows

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Jan 19, 2014, 07:00 UTC
Message-ID
<CAHGBnuMDyxapRdfRN2PuHE5ULeGUft7J-EroXcxjpzzn3Kpi7Q@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.1401022212150.1191@s15462909.onlinehome-server.info>

On Thu, Jan 2, 2014 at 10:19 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 15 quoted lines
>> and parsed to be stuffed into trees), it is fine to do so as long as all
>> the codepaths understands the new world order, but my earlier "git grep"
>> hits did not tell me that such a change is warranted.
>
> You call safe_create_leading_directories() with an argument that is
> supposed to be the final path, correct? So what exactly is wrong with
> safe_create_leading_directories() creating all the directories necessary
> so that we can write to the path afterwards, *even* if that path is
> interpreted in a platform-dependent manner (as one would actually expect
> it to)?
>
> Last time I checked we did not make a fuss about
> safe_create_leading_directories() interpreting the argument in a
> case-insensitive fashion on certain setups, either. So it is not exactly a
> new thing that the paths are interpreted in a platform-dependent manner.

Sorry for the late reply. I just want to add that on top of that, I would expect any function called *safe*_create_leading_directories() in a cross-platform project like Git (yes, effectively Git has become a cross-platform project by now) to gracefully handle platform-specific input. In other words, I would expect the word "safe" to be applied not only to the output (the creation of the directory hierarchy with any missing parent directories) but also to the input (the arguments to the function).

-- 
Sebastian Schuberth
Previous: Johannes SchindelinNext: Sebastian Schuberth
Message 20 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.