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

Bug: git add with absolute path fails if repo root dir is a symlink

From
Alexander Gladysh <agladysh@gmail.com>
Date
Dec 27, 2010, 06:25 UTC
Message-ID
<AANLkTi=Mj3AdinC87Ys35fv9DpZqefiZXhPbHMLdmyPh@mail.gmail.com>
Hi, list.
Yet another issue with Git symlink handling.

I can't run git add with absolute path if the repository's root directory is a symlink.

Please see the transcript below for details.
Alexander.

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.10 Release: 10.10 Codename: maverick

$ uname -a Linux ubuntu 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linux

$ git --version git version 1.7.3.4

$ mkdir myrepo && cd myrepo $ git init $ touch alpha $ git add alpha $ git commit -m "initial commit"

$ cd ../ $ ln -s myrepo mysymlink $ cd mysymlink $ git status $ touch beta

$ git add ~/tmp/git-test/mysymlink/beta fatal: '/home/agladysh/tmp/git-test/mysymlink/beta' is outside repository

$ cd ../myrepo/ $ git add ~/tmp/git-test/myrepo/beta $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: beta #

Next: Alexander Gladysh
Message 1 of 3 in “Bug: git add with absolute path fails if repo root dir is a symlink”
  1. Alexander GladyshDec 27, 2010
  2. Alexander GladyshDec 27, 2010
  3. Carlo Marcelo Arenas BelonDec 27, 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.