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

Re: [PATCH] Handle double slashes in make_relative_path()

From
Johannes Sixt <j6t@kdbg.org>
Date
Jan 23, 2010, 19:00 UTC
Message-ID
<201001232000.28896.j6t@kdbg.org>
In-Reply-To
<201001231448.42721.robin.rosenberg@dewire.com>
On Samstag, 23. Januar 2010, Robin Rosenberg wrote:
Show 11 quoted lines
> lördagen den 23 januari 2010 14.09.29 skrev  Johannes Sixt:
> > The function returns either the input unmodified, or it strips also at
> >  least one directory component, except when base is only "/" (or "//" or
> >  "///"...). I said in practice, because on Windows it does not make sense
> >  to invoke git with (literally)
> >
> >    git --git-dir=//server/share/repo.git --work-tree=/ ...
> >
> > i.e., without a drive prefix before the slash of --work-tree.
>
> Why not? //foo/bar/z is just as valid and useful a path as x:/z.

Fortunately, make_relative_path() does not have the slightest problem with //foo/bar/z, either as value of abs (the path to make relative) or as base (the path to strip from abs).

-- Hannes
Previous: Robin RosenbergNext: Junio C Hamano
Message 8 of 20 in “Handle double slashes in make_relative_path()”
  1. Handle double slashes in make_relative_path()Thomas Rast, Jan 22, 2010
  2. Junio C HamanoJan 22, 2010
  3. Junio C HamanoJan 22, 2010
  4. Johannes SixtJan 22, 2010
  5. Robin RosenbergJan 23, 2010
  6. Johannes SixtJan 23, 2010
  7. Robin RosenbergJan 23, 2010
  8. Johannes SixtJan 23, 2010
  9. Junio C HamanoJan 23, 2010
  10. Junio C HamanoJan 23, 2010
  11. Johannes SixtJan 23, 2010
  12. Sverre RabbelierJan 23, 2010
  13. Thomas RastJan 24, 2010
  14. Bernhard R. LinkJan 24, 2010
  15. Junio C HamanoJan 24, 2010
  16. Johannes SixtJan 24, 2010
  17. Junio C HamanoJan 24, 2010
  18. Robin RosenbergJan 25, 2010
  19. Thomas RastJan 22, 2010
  20. Junio C HamanoJan 22, 2010

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.