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

Re: Difficulty adding a symbolic link, part 3

From
Dale R. Worley <worley@alum.mit.edu>
Date
Aug 1, 2013, 13:56 UTC
Message-ID
<201308011356.r71DuKUK007167@freeze.ariadne.com>
In-Reply-To
<CACsJy8DZ11zFEgL_vZ-kG2tuwodU=vBJZqZxUPWtYh9u8o-_Tg@mail.gmail.com>
> From: Duy Nguyen <pclouds@gmail.com>
Show 6 quoted lines
> > With the above change, the test suite runs with zero failures, so it
> > doesn't affect any common Git usage.
> 
> It means the test suite is incomplete. As you can see, the commit
> introducing this change does not come with a test case to catch people
> changing this.
Who should be blamed for omitting the test?
Show 7 quoted lines
> > Can someone give me advice on what this code *should* do?
> 
> It does as the function name says: given cwd, a prefix (i.e. a
> relative path with no ".." components) and a path relative to
> cwd+prefix, convert 'path' to something relative to cwd. In the
> simplest case, prepending the prefix to 'path' is enough. cwd is also
> get_git_work_tree().

But as you can see, the exact behavior that the function is intended to exhibit regarding symlinks is not clear from the function name; there should have been a real explanation in the comment above the function.

Dale
Previous: Duy NguyenNext: Dale R. Worley
Message 3 of 5 in “Difficulty adding a symbolic link, part 3”
  1. Dale R. WorleyJul 31, 2013
  2. Duy NguyenAug 1, 2013
  3. Dale R. WorleyAug 1, 2013
  4. Dale R. WorleyAug 1, 2013
  5. Duy NguyenAug 2, 2013

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.