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 filter-clean: cache already exists #80

Open
wgeorg opened this issue Feb 22, 2018 · 3 comments
Open

git-fat filter-clean: cache already exists #80

wgeorg opened this issue Feb 22, 2018 · 3 comments

Comments

@wgeorg
Copy link

wgeorg commented Feb 22, 2018

Hi,

I'm using a git repo with git-fat for my large files. When I run "git status" the following message appears

git-fat filter-clean: cache already exists .git/fat/objects/da39a3ee5e6b4b0d3255bfef95601890afd80709

What does this mean and how can this be resolved? Commit, push and pull work without any problems.

@jedbrown
Copy link
Owner

jedbrown commented Mar 23, 2018 via email

@rob-debug
Copy link

rob-debug commented Mar 3, 2020

i'm seeing the same thing. I'm running into an issue where any command i run (local or remote) has a long response time. It takes about 15-20mins to complete any [git status, git pull, git stash etc.] This is coming off a fresh clone of the repo

When i do a git pull it runs through each object with

git-fat filter-clean: cache already exists .git/fat/objects/1c5d3d439f4382a6b5ce76d9a2909fa6a2ee090d

and then exits with

error: cannot pull with rebase: Your index contains uncommitted changes.
error: please commit or stash them.

When i do git checkout -- . it then runs through each object with

git-fat filter-smudge: restoring from .git/fat/objects/1c5d3d439f4382a6b5ce76d9a2909fa6a2ee090d

When I do git stash it runs through each object with

git-fat filter-clean: cache already exists .git/fat/objects/1c5d3d439f4382a6b5ce76d9a2909fa6a2ee090d

I'm not really sure what is happening here, because since this is a fresh clone there are no changes that I've made, but even when i dump whatever changes it think has happened it puts me in this loop. And when i type git status it says "your branch is up to date with 'origin/branch'"

@arithboy
Copy link

I find the solution from https://git-scm.com/docs/racy-git
This is script I use:

#!/bin/sh

# from https://git-scm.com/docs/racy-git/en
export GIT_FAT_VERBOSE=1

git status 2>&1 | grep "cache already exists" | awk '{print $6}' | xargs -I {}  ls -al {} |awk '{print $5}'| xargs -I {} find */ -size {}c > /tmp/list

date > /tmp/datestamp
cat /tmp/list | xargs touch -r /tmp/datestamp
cat /tmp/list | git update-index --stdin
touch -r /tmp/datestamp .git/index

rm /tmp/datestamp /tmp/list

git status
git status

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

4 participants