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

Symbolic links create dirty state from git.

From
TSTimothy Schaeffer <tschaeffer@dramail.com>
Date
Mar 24, 2008, 21:28 UTC
Message-ID
<138905EB75AB0D44B6A0ECD251A92EA79C2D67@sdra00198.intranet.dra-inc.net>
Hello,

I cloned a repo from another with symbolic links. Now the symbolic links appear as modified files, and nor resetting, nor committing, nor ignoring, nor `rm --cache`ing will take them out of their dirty state.

If I try to commit them, I get

error: readlink("lib/systems/asdf-system-connections.asd"): Invalid argument fatal: unable to index file lib/systems/asdf-system-connections.asd

The link, however, is fine: it points to a valid, existing file, which I can read through the link. It is a relative link pointing to another file which is also tracked by the repo. The links have not changed.

I have added these files to .gitignore, but git doesn't.

I can switch to another branch with regular git-checkout <branch>, and these no longer appear in the index while in that branch. When I switch back, they show up again.

When I look at these in git-gui, it tells me that it can find no differences, and tries to remove it from them index, but it pops right back into "Unstaged Changes".

The times on all of the symlinks are today's. Is this why git thinks they have changed?

Now, I'm stuck.  Can anyone tell me how I might get these out of the way?

git version 1.5.4.rc2.417.g3d51e Linux dra00594 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 UTC 2008 i686 GNU/Linux

Thanks,
Tim S.
Next: Timothy Schaeffer
Message 1 of 2 in “Symbolic links create dirty state from git.”
  1. Timothy SchaefferMar 24, 2008
  2. Timothy SchaefferMar 25, 2008

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.