Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange behaviour with symlinks in git #574

Closed
r-ricci opened this issue Jun 6, 2021 · 1 comment
Closed

strange behaviour with symlinks in git #574

r-ricci opened this issue Jun 6, 2021 · 1 comment

Comments

@r-ricci
Copy link

r-ricci commented Jun 6, 2021

I have a git repository inside gocryptfs. After upgrading from 1.8.0 to 2.0 I noticed that sometimes git incorrectly reports symlinks as modified.

Exact steps to reproduce:

mkdir cipherdir mountpoint
gocryptfs -extpass 'echo pass' -init cipherdir
gocryptfs -extpass 'echo pass' cipherdir mountpoint
cd mountpoint

echo sometext > file
ln -s file link

git init
git add file link
git commit -m commitmsg

rm link
git restore link
git status
# the link is now marked as modified, but this is impossible

git add link
git status
# git figured out that no change happened

This doesn't happen on a regular filesystem or with gocryptfs 1.8.0.

Version: gocryptfs v2.0 without_openssl; go-fuse [vendored]; 2021-06-06 go1.16.5 linux/amd64
git version: 2.31.1

@rfjakob
Copy link
Owner

rfjakob commented Jun 6, 2021

Thanks for the report! I can reproduce this. gocryptfs reports the wrong size on symlink creation:

19:05:24.583446 rx 8296: SYMLINK n2 ["link" "file"] 10b
19:05:24.583490 tx 8296:     OK, {n708 g1 tE=1s tA=1s {M0120777 SZ=48 L=1 1026:1026 B0*4096 i0:171340 A 1622999124.582189 M 1622999124.582189 C 1622999124.582189}}

@rfjakob rfjakob closed this as completed in 17f859d Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants