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

Re: Git doesn't support symlinks

From
Bryan Turner <bturner@atlassian.com>
Date
Mar 26, 2020, 00:23 UTC
Message-ID
<CAGyf7-FF0aEEiRGjZ_+RuyYnSV5cYn+-Hp5q7dZRADj_VL034g@mail.gmail.com>
In-Reply-To
<CA8EDABA-A41C-4177-A149-51DCD07C319C@googlemail.com>

On Wed, Mar 25, 2020 at 4:38 PM Daniel Malendez <dmalendez@googlemail.com> wrote:

Show 14 quoted lines
>
> Hi everyone,
>
> I use `Ubuntu 18.04` with filesystem `ext` and `git 2.26.0`. I want to add a macOS Framework to my git repo, which fails with the following error message:
>
>     $ git add -f /var/opt/project1/Foo.framework/Headers/Interior.h
>     fatal: pathspec '/var/opt/project1/Foo.framework/Headers/Interior.h' is beyond a symbolic link
>
> If I use `$ git add .` it works fine. Is this a bug? This is what `ls` returns
>
>     Foo.framework $ ls -l
>     lrwxr-xr-x  Headers -> Versions/Current/Headers
>     lrwxr-xr-x  Resources -> Versions/Current/Resources
>     drwxr-xr-x  Versions

This didn't add the same thing. What does a "git status" show at this point? I'd expect it would show "Versions/Current/Headers/interior.h" as added to the index, not "Headers/interior.h".

>
> This sounds like a bug, correct? If not, I am thankful for any advice! Thanks!
>

It doesn't necessarily seem like a bug, to me; more like a case where Git could potentially be "smarter" to try and determine that, while "Headers/interior.h" is beyond a symlink, the target of that symlink is still in the repository. (Versions/Current _is_ in the same repository, right?)

Show 5 quoted lines
>
>
>
> Best Regards,
> Daniel
Previous: Daniel MalendezNext: Daniel Malendez
Message 2 of 4 in “Git doesn't support symlinks”
  1. Daniel MalendezMar 25, 2020
  2. Bryan TurnerMar 26, 2020
  3. Daniel MalendezMar 26, 2020
  4. Danh DoanMar 26, 2020

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.