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

git-fat behaves unexpectedly after performing "cp -a" on the repository #73

Open
rwh21 opened this issue Dec 12, 2016 · 3 comments
Open

Comments

@rwh21
Copy link

rwh21 commented Dec 12, 2016

If I run "cp -a" to make a copy of the entire git repository, and I'm using git-fat, some unexpected behaviour is displayed: If I run "git status" on the copy I have made, it reports a number of modified files that weren't modified in the original repository.

What seems to be happening is that git-fat re-evaluates any large files that are stored directly in git, e.g. legacy files from before I started using git-fat, and moves them into the fat store.

I understand from reading the docs that git-fat is supposed to consider only new or modified files for inclusion into the fat store, and leave existing files alone. It seems that copying the repository with "cp -a" makes git-fat think that the files are new.

The steps to reproduce this are as follows:-

  1. Create a git repository.
  2. Commit some .tar.gz files.
  3. Set up git-fat, with a valid .gitfat file, remote store, and a .gitattributes file containing *.tar.gz.
  4. Commit the .gitfat and .gitattributes files.
  5. Run "git status" to check that there are no uncommitted changes.
  6. Use "cp -a" to take a copy of the repository: cp -a repository repository.copy
  7. cd repository.copy
  8. "git status" says that all the .tar.gz files committed in step (2) are modified.

Simply renaming the repository doesn't cause the issue. It's happens only when I copy the repository.

@jedbrown
Copy link
Owner

jedbrown commented Dec 12, 2016 via email

@rwh21
Copy link
Author

rwh21 commented Dec 13, 2016

Thank you for your reply. I tried the latest version of git (2.11.0.22.g8d7a455), but this doesn't appear to have made any difference. I also tried git checkout -f. This did make a difference, and the results were surprising: it reduced the number of files being reported as "modified" to a much smaller number, but never zero. Repeating the test several times, the result was different each time. I am confused by this randomness.
"git checkout -f ." has an effect the first time it runs, but if I run it multiple times in the same repository the number of modified files remains the same.

@jedbrown
Copy link
Owner

jedbrown commented Dec 14, 2016 via email

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