Skip to content

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

@rwh21

Description

@rwh21

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions