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 LFS files result in errors #7

Open
aminya opened this issue Nov 2, 2023 · 3 comments
Open

Git LFS files result in errors #7

aminya opened this issue Nov 2, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@aminya
Copy link

aminya commented Nov 2, 2023

When I try to use git-warp-time to reset the times, I get an error that <the list of files in git lfs> are not tracked in the repository.

format!("Paths {not_tracked:?} are not tracked in the repository");

Is it possible to support git-lfs?

@alerque
Copy link
Owner

alerque commented Nov 2, 2023

I'm sure it's possible, I just don't have much expertise with git lfs. I'm more of a git annex guy myself! I don't know when/if I'll be able to fiddle with this myself, but it probably isn't too hard to actually do.

I presume libgit2 supports it, we just have to add some incantations to mix in LFS tracked files to the list of things we attempt to act on, and then also possibly add a different way to lookup their last changed timestamp.

I'd be happy to help facility a fix getting merged and released if you or anyone wants to jump into this.

I'll also just note that I recently considered switching from libgit2 to gitoxide. I ran into some trouble with incomplete API coverage, but if anybody happened to want to run with that I'd be happy to see it happen. If that made it easier (or harder) to support LFS that would factor in too. I'll post my WIP as a draft so anybody could tinker with it from there.

@alerque alerque added enhancement New feature or request help wanted Extra attention is needed labels Nov 2, 2023
@aminya
Copy link
Author

aminya commented Feb 28, 2024

For the start, if there is a way to ignore untracked files like Git LFS files, it would be great.

@alerque
Copy link
Owner

alerque commented Feb 29, 2024

@aminya I don't understand that commend, git warp-time already ignores untracked files. By default it works only on a list of tracked files.

I'm guessing the actual problem is that the mechanism being used to find a list of tracked files is returning LFS tracked files, but the mechanism used to retrieve history can't find any and falsely concludes they are not tracked. Yes, a way to catch and exclude LFS from our collection of "tracked" files we try to operate on would be welcome as a starting point if that's easier to implement than walking LFS history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants