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

Retroactive import doesn't match up with ongoing usage #27

Open
justinclift opened this issue Oct 11, 2014 · 3 comments
Open

Retroactive import doesn't match up with ongoing usage #27

justinclift opened this issue Oct 11, 2014 · 3 comments

Comments

@justinclift
Copy link

One of the interesting things that showed up the other day when importing a large git repo, is that the steps for retroactive importing have a "find" command that locates files over X size.

Which is weird, as the whole point of using git-fat isn't to separate out files over X size, but to separate out specific file types (eg .jpg, .png, etc).

Is there a way to generate the retroactive file list using file types (eg .jpg, .png, etc), instead of using their file size? That would be more in line with how imported git-fat repos are then used. 😄

@abraithwaite
Copy link

Hmm, this is an excellent point. We actually use git-fat to prevent any large files from getting into the repository using a pre-commit hook, so that was our primary use case. However, git doesn't have an 'over-x-size' gitattributes filter mechanism (as far as I know), so patterns were used instead in the .gitattributes file as a kind of workaround.

I do see big value in a command to find a particular filename in the repositories history though. Judging from this stack overflow question, it would be nice to have a command for it in git-fat.

I'll start investigating it!

@abraithwaite
Copy link

I haven't forgotten about this. This issue made me discover a potentially more efficient and cleaner way of finding files in the repository. I just haven't had the time to investigate it in detail yet since it's in one of the core functions of the script.

If you're curious, I'm looking at replacing git rev-list and git cat-file with git ls-tree -lr in the _rev_list function which is called by _managed_files. _managed_files is the core function which finds all the git-fat files in the repository.

@justinclift
Copy link
Author

Interesting. My understanding of git internals isn't (yet) good enough to grok this properly, though I am putting time into fixing that. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants