threads / discuss / 12849

Symbolic links create dirty state from git.

Subject: Symbolic links create dirty state from git.

## tl;dr

2 messages between Mar 24, 2008 and Mar 25, 2008.

replies: 1people: 1as markdown or json

Timothy Schaeffer· Mar 24, 2008, 21:28 UTC · lore
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.
Timothy Schaeffer· Mar 25, 2008, 15:15 UTC · re: Timothy Schaeffer · lore

RE: Symbolic links create dirty state from git.

Show 15 quoted lines
> -----Original Message-----
> From: git-owner@vger.kernel.org 
> [mailto:git-owner@vger.kernel.org] On Behalf Of Timothy Schaeffer
> Sent: Monday, March 24, 2008 5:28 PM
> To: git@vger.kernel.org
> Subject: Symbolic links create dirty state from git.
> 
> 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.  
> ...
This turns out to be a known bug with my version of encfs:
1.4.1 (Jan 12, 2008) Change Log 
Bug fixes:
    * return unencrypted link size on fstat of a symbolic link, 
      otherwise git fails when working with symbolic links.  
So, thanks for nu'in. :-)
Tim S

← back to recent threads