Skip to content

Git Lfs - #7098

Closed
gusinacio wants to merge 3 commits into
jj-vcs:mainfrom
gusinacio:lfs
Closed

Git Lfs#7098
gusinacio wants to merge 3 commits into
jj-vcs:mainfrom
gusinacio:lfs

Conversation

@gusinacio

@gusinacio gusinacio commented Jul 27, 2025

Copy link
Copy Markdown

Partially fixes #80. There's no handling of Git LFS inside jj, it just ignores so you can handle with git lfs <command>.

Thanks to @bcspragu with #6036, @weiznich #5480, and @kejadlen (where I forked the current branch).

Checklist

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes

@gusinacio
gusinacio requested a review from a team as a code owner July 27, 2025 18:35
@google-cla

google-cla Bot commented Jul 27, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gusinacio

Copy link
Copy Markdown
Author

@weiznich is missing CLA 😔

@gusinacio
gusinacio force-pushed the lfs branch 10 times, most recently from a7bda24 to 17485ec Compare July 27, 2025 19:25

@PhilipMetzger PhilipMetzger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor nits, I am also cc'ing @06393993 since he's actively working on the Gitattributes design.

Comment thread CHANGELOG.md
Comment thread lib/src/gitattributes.rs
Comment thread lib/src/lib.rs
@06393993

06393993 commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

While none of the following questions should block the merge, they are probably worth answering:

  1. It seems that this change only handles the snapshot path. I am wondering if I am missing anything, or we haven't considered the update path(store -> disk) yet? If so, how are merge conflicts handled?
  2. IIUC, on snapshot, all the .gitattributes files in the repo are parsed. It is possible to come up with a desgin that avoids reading and parsing .gitattributes files only relevant to the unchanged files. For example, if the current change happens only under the folder a, it's possible to not read and parse the .gitattributes files under the folder b. But this is probably less of an issue, because even Firefox has only 8 .gitignore files. However, we should document that and be clear that we are reading and parsing irrelevant gitattributes files.
  3. GIt doesn't follow symbolic links for gitattributes files. In this PR, IIUC, it seems that we always follows the symbolic links. We should either leave a TODO comment or an explanation if we decide to behave differently from git.
  4. How do we expect the future integration with the git smudge/clean filter feature, and the EOL conversion feature?

@gusinacio

Copy link
Copy Markdown
Author

While none of the following questions should block the merge, they are probably worth answering:

1. It seems that this change only handles the snapshot path. I am wondering if I am missing anything, or we haven't considered the update path(store -> disk) yet? If so, how are merge conflicts handled?

I haven't considered it. My initial goal is to ignore all git-lfs files so we can handle them properly using normal git lfs commands. Like in gitignore, if you want to start tracking using gitlfs, you need first to jj file untrack <path>, so hopefully no merge conflicts happen after it's untracked by jj. Although, there's a known issue where if you move between changes with and without gitattributes, you need to do git lfs checkout manually.

I'm open/available to do any requested change.

2. IIUC, on snapshot, all the `.gitattributes` files in the repo are parsed. It is possible to come up with a desgin that avoids reading and parsing `.gitattributes` files only relevant to the unchanged files. For example, if the current change happens only under the folder `a`, it's possible to not read and parse the `.gitattributes` files under the folder `b`. But this is probably less of an issue, because even [Firefox has only 8 `.gitignore` files](https://github.com/search?q=repo%3Amozilla-firefox%2Ffirefox++path%3A**%2F.gitattributes&type=code). However, we should document that and be clear that we are reading and parsing irrelevant `gitattributes` files.

That is a great question. If we don't parse .gitiattributes, the snapshot engine will interpret that gitattributes filtered files are part of the change. It's already how we are doing for gitignore. If we can answer this question for gitattributes we can also proabably do the same for gitignore.

3. [GIt doesn't follow symbolic links for `gitattributes` files](https://git-scm.com/docs/gitattributes#_notes). In this PR, IIUC, it seems that we always follows the symbolic links. We should either leave a TODO comment or an explanation if we decide to behave differently from git.

Thanks for pointing this out. That part of the code was taken from gitignore.rs which looks like follows symlinks as well since it uses same method path.is_file() which follows symlinks even though Git says it shouldn't. Is there any issue about this? Should I update .gitattributes to not follow symlinks and let .gitignore follow it?

4. How do we expect the future integration with the git smudge/clean filter feature, and the EOL conversion feature?

Probably for next steps, is to add commands under jj git lfs that are gonna update .gitattributes directly. I also expect that we're gonna reuse GitAttributesFile for the diff engine, if not to ignore, at least to have a different path when a file is flagged with LFS. One thing that will change for sure is the config file, since we currently have a list of "lfs filters" to ignore, that won't be necessary.

In any case, I haven't planned for that and I'm open to suggestions or at least make the code more prepared for future work.

@06393993

Copy link
Copy Markdown
Contributor

I am asking in details just because this CL is very different from my design, that I plan to propose early this August, and am nervous about the unfortunate conflict: either my design will be rejected, or we need to revert this PR to adopt my design. If you are not hurry with this PR, I am wondering if you could read my design if you haven't already?

My initial goal is to ignore all git-lfs files

Sorry for not being clear, but I was asking about the behavior of the git.ignore-filters settings on checkout, not about how one should checkout git lfs files. If we are ignoring files, IMO, we should also consider ignoring those files on the checkout path(store to disk). IIUC, your current PR only ignore those files when snapshotting(disk to store).

For example, if one runs jj git clone <SOURCE> with the proper git.ignore-filters settings, those git LFS files will still be checked out in their original shape instead of being ignored. We probably do that on purpose, so that the following git lfs pull just work, but we probably need to document that somewhere.

And when it comes to implement the checkout path, merge conflicts on gitattributes files become an issue - and this is what I mean by merge conflicts.

Applogize again that I didn't make myself clear what I mean on my original question. I personally don't think this potentially inconsistency should block this PR, but I generally am not sure about the standard of the jj project, so just raise the question so that the core maintainers won't overlook them.

If we don't parse .gitiattributes, the snapshot engine will interpret that gitattributes filtered files are part of the change.

That's not necessarily the case. We can still ignore those files in TreeState::snapshot where we receive the changes from deleted_files_rx and file_states_rx. We can read and parse gitattributes files there to avoid handling irrelevant gitattributes files.

If we can answer this question for gitattributes we can also proabably do the same for gitignore.

I don't think we should do the same to gitignore file, because the performance cost can be expensive, while for gitattributes files it's a pure performance win. gitattributes files are different from gitignore files: gitattributes won't match folders, while gitignore does:

patterns that match a directory do not recursively match paths inside that directory (so using the trailing-slash path/ syntax is pointless in an attributes file; use path/** instead)

From the gitattributes documentation.

While it is also possible to read and parse gitignore files after we generate the list of potentially changed files and folders to save some parsing, but it is likely that if we can parse the gitignore file early and skip some folders when we visit the file system, we can save much more. On the contrast, gitattributes files can't be used to skip directories, so parsing them proactively won't save us anything(theoretically you could, via the path/** pattern, but ultimately gitattributes files are not used for ignoring files, and if we want to use it to skip folders, we need special treatments for those patterns).

For example, in a Rust project, people usually put target in .gitignore. Parsing gitignore files after we generate the list of potentially changed files and folders means that we need to visit every single file under the target folder because we don't know the target folder should be ignored at visit time. And that will just be very slow. This scenario is much less likely for gitattributes files: not only because gitattributes files don't accept folder patterns, it's also because gitattributes files are not meant to be used to ignore files.

Is there any issue about this? Should I update .gitattributes to not follow symlinks and let .gitignore follow it?

Nice catch on the inconsistent gitignore behavior with git.

As of the next step, I am not sure. However, if I were you I would:

  • File a github issue on the potential problematic jj gitignore file handling on symbolic link and check what the behavior the core maintainer wants to follow. Just in case there is a reason for the current gitignore implementation.
  • Ask other core developers to make a decision on how to handle symbolic links for gitattributes files. (probably ask martinvonz who makes many desgin decisions when I have a question).

But, changes to gitignore behaviors will be in another commit if not another PR.

Probably for next steps, is to add commands under jj git lfs that are gonna update .gitattributes directly.

Sorry I don't understand why would we need to introduce a command to update gitattributes files. Can you elaborate that a bit? Thanks.

I'm open to suggestions

My simplisitic thought is that, the current interface doesn't make it easy to integrate with future tasks. For both the filter feature(which should solve the git lfs support once and for all) and the EOL conversion feature, we need to know the exact state of an attribute. And the EOL conversion feature needs to query the state of the eol attribute and the text attribute. Neither is supported by today's interface.

I also expect that we're gonna reuse GitAttributesFile for the diff engine

I would argue that my design is more ergonomic, because with my design the diff tool code doesn't need to build up the gitattributes tree on its own. The current design requires the caller of GitAttributesFile to build up the gitattributes tree on its own by calling chain_with_file on every directory entry.

@gusinacio

Copy link
Copy Markdown
Author

I am asking in details just because this CL is very different from my design, that I plan to propose early this August, and am nervous about the unfortunate conflict: either my design will be rejected, or we need to revert this PR to adopt my design. If you are not hurry with this PR, I am wondering if you could read my design if you haven't already?

Thanks for sending me the design proposal. I was out of the loop but now I'm gonna take a look at it.

I'm not in a hurry with this PR, it's just that I've been using outdated versions of jj and alternatives PR/branches for months now and I'd like to have some support soon. In any case, I'm gonna review this proposal and try to make this PR compatible with it or give feedback about it (if I find something that doesn't fit).

@06393993

Copy link
Copy Markdown
Contributor

Thanks.

The plan for my design is to go through the formal design process to avoid surprises on code review. I was somewhat actively discussing the design in the dicord channel mentioned in the readme file:

https://github.com/jj-vcs/jj/blob/main/README.md?plain=1#L11

@yuja

yuja commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

Regarding .gitignore, I don't think jj should follow symlinks in the working copy in general. Suppose git doesn't, I would say the current behavior is a bug. Please feel free to file a bug report.

@zx8

zx8 commented Aug 3, 2025

Copy link
Copy Markdown

I built this PR locally with cargo build -p jj-cli --release and am attempting to use it with my dotfiles repository.

I added the following to my ~/.config/jj/config.toml:

[git]
ignore-filters = ["git-crypt"]

And I have the following in my .gitattributes:

ssh/.ssh/* filter=git-crypt diff=git-crypt

Yet when I run jj status, I still see:

M ssh/.ssh/id_rsa

What am I doing wrong?

@gusinacio

Copy link
Copy Markdown
Author

I built this PR locally with cargo build -p jj-cli --release and am attempting to use it with my dotfiles repository.

I added the following to my ~/.config/jj/config.toml:

[git]
ignore-filters = ["git-crypt"]

And I have the following in my .gitattributes:

ssh/.ssh/* filter=git-crypt diff=git-crypt

Yet when I run jj status, I still see:

M ssh/.ssh/id_rsa

What am I doing wrong?

You probably need to do jj file untrack ssh/.ssh/id_rsa since the file was probably already in the commit.

@udaya2899

Copy link
Copy Markdown

@gusinacio @06393993 do you folks think this PR is ready? We'd really like to make jj become usable in our org as our repo has a lot of LFS files.

I've been trying this off of this branch, works fairly well for our use case. But it's harder to share with the rest of the org as we'd prefer a pre-installed binary in the VSCode Devcontainer. Any further progress in this PR would be helpful for us. Thanks in advance

@06393993

Copy link
Copy Markdown
Contributor

Re udaya2899,

I am not a maintainer, so I can't make the decision. But I personally am not against this PR, because we can always introduce fixes afterwards. However, this PR does have some problems that I don't think we have a good answers for:

  • It always reads and parses all the .gitattributes files. While this may not introduce performance issues in practice, we probably need to document that somewhere.
  • git.ignore-filters only takes effect on snapshot, but not on checkout. While this may be a deliberate design, it's not intuitive.
  • This question is for the maintainers: this PR is clearly not compatible with the proposed design. What's our plan if we merge this PR? Are we Ok with accepting the alternative design and refactor this PR(mostly revert) accodingly in the future?

@udaya2899

Copy link
Copy Markdown

Thanks 06393993 for clarifying. I request @yuja or @martinvonz or any other maintainer to pitch-in and help resolve the questions and merge this.

This PR makes jj usable in repos with LFS (#80) and we've been using this branch for a long while and would like to use from the main branch.

@zx8

zx8 commented Aug 26, 2025

Copy link
Copy Markdown

I've also been manually compiling this branch locally in order to make jj usable. Given how long this feature has been outstanding for (including all the previous attempts), I'd argue that at this point just getting something merged in to get things moving is worthwhile, and iterate on it later.

It could even be flagged as an experimental feature, as has been done with other configuration options (like auto-advance branches), just so users can start playing with it without having to rebase and compile custom branches, and most importantly allow the average jj user to provide feedback.

@06393993 06393993 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just completed my first round of review for the implementation part of the "git-attributes: add git attributes file support" commit. I will take closer look at tests later.

Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
return Ok(None);
};
// try to resolve the file
let id = match &file_to_merge.resolve_trivial(SameChange::Accept) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not very familiar with the purpose of adding the same_change parameter, but most old call sites just use SameChange::Accept, so I assume SameChange::Accept is correct.

Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs
Comment thread lib/src/gitattributes.rs Outdated

@06393993 06393993 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can we squash the "git-attributes: use .gitattributes file for current folder" commit into the "git-attributes: add git attributes file support" commit?
  2. We are missing some tests but that can be another PR from me if you don't want to do the job:
    1. Tests for the 2 FileLoader implementations. TreeFileLoader is especially complicated and worth testing.
    2. Stress test on the depth of the folder to ensure that the recursion implementation won't result in stack overflow under reasonable workload.
    3. Simple integration tests to make sure that everything is glue-ed correctly.
  3. I may change the design to specify the FileLoader priority at GitAttributes creation time, and we allow aribtrary number of FileLoader to initialize GitAttributes. This could simplify the implementation. But that's another issue to solve, and will be a different PR.

Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated

@06393993 06393993 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current design handles only snapshot(disk -> store) but doesn't handle update(store -> disk) at all. While I understand why it's implemented such way, I am wondering if other maintainers will accept such confusing implementation. So we should definitely need an approval on this question from one of maintainers.

I am especially not quite sure how this would influence the file_states cache in the TreeState proto(in lib\src\protos\local_working_copy.proto). Such implementation can result a weird TreeState::file_states: after snapshot, the ignored files disappear in TreeState::file_states, but after update(or checkout), the ignored files will be added back to TreeState::file_states. Not sure how bad the consequence can be. Definitely need another eye on this.

In addition, I think it's worth explaining the "ignore only on snapshot" behavior in details in docs, including some possible weird behavior1, both in cli/src/config-schema.json where jj generates it's CLI help document and the online document(under the docs/config.md document).

Footnotes

  1. e.g. if the user removes a file ignored in a revision, jumps to a different revision, and jumps back to the revision, they will see that the file appears again and is not removed

Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/settings.rs
executable_path: settings.get("git.executable-path")?,
write_change_id_header: settings.get("git.write-change-id-header")?,
colocate: settings.get("git.colocate")?,
ignore_filters: settings

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also change cli/src/config-schema.json and relevant tests?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added to config-schema.json. Any examples on which tests to add for it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added to config-schema.json. Any examples on which tests to add for it?

Check the test failure and you can tell what you missed. Currently, you fail the test_config_get_yields_values_consistent_with_schema_defaults test. But it's possible that you fail some other tests once you fix this one. So just rerun the entire test suites locally to know what you miss.

Comment thread lib/src/gitattributes.rs
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/local_working_copy.rs
Comment thread lib/src/local_working_copy.rs Outdated

@PhilipMetzger PhilipMetzger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor stuff

Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/gitattributes.rs Outdated
Comment thread lib/src/local_working_copy.rs Outdated
Comment thread lib/src/local_working_copy.rs

@06393993 06393993 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you miss the message from discord channel:

Can you also take a look at #7098 (review) and reply to it? The current behavior is understandably weird in that we don't handle update(store -> disk), but only handle snapshot(disk -> store). I think we need to document in details why we need such weird behavior to avoid future maintainers from confusing or even incorrectly "fixing" this weird behavior. Besides, we should make sure maintainers know that this design is deliberate, and they accept such design.

@PhilipMetzger PhilipMetzger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would look good if we didn't choose another approach in the Design doc.

@romen

romen commented Dec 22, 2025

Copy link
Copy Markdown

I think this would look good if we didn't choose another approach in the Design doc.

@PhilipMetzger which design doc are you referring to? I am looking at https://github.com/jj-vcs/jj/tree/1e521f564dcec8f93ba3b0a494259d38ef0d8341/docs/design and cannot see any mention of LFS.

But maybe what you are referring to is some indirect effect of another design doc on attribute handling?

It would be nice to understand if it would be doable to go with this "ignore lfs" approach and the work done by @gusinacio in this PR for the time being until the time when jujutsu will have implemented the "better-LFS" plans!

@06393993

06393993 commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

I think this would look good if we didn't choose another approach in the Design doc.

@PhilipMetzger which design doc are you referring to? I am looking at https://github.com/jj-vcs/jj/tree/1e521f564dcec8f93ba3b0a494259d38ef0d8341/docs/design and cannot see any mention of LFS.

But maybe what you are referring to is some indirect effect of another design doc on attribute handling?

It would be nice to understand if it would be doable to go with this "ignore lfs" approach and the work done by @gusinacio in this PR for the time being until the time when jujutsu will have implemented the "better-LFS" plans!

Please refer to #8144 for the WIP filter gitattributes design. Thanks.

@romen

romen commented Dec 23, 2025

Copy link
Copy Markdown

Please refer to #8144 for the WIP filter gitattributes design. Thanks.

Thanks @06393993 for the additional context!

@martinvonz martinvonz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry about the very long delay in reviewing this. I hope you haven't given up on this PR.

Comment thread cli/src/cli_util.rs Outdated
Comment on lines +1440 to +1452
#[cfg(not(feature = "git"))]
pub fn base_attributes(&self) -> Result<Arc<GitAttributesFile>, ConfigGetError> {
Ok(Arc::new(GitAttributesFile::default()))
}

#[cfg(feature = "git")]
#[instrument(skip_all)]
pub fn base_attributes(&self) -> Result<Arc<GitAttributesFile>, ConfigGetError> {
Ok(Arc::new(GitAttributesFile::new(
&self.settings().git_settings()?.ignore_filters,
)))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use cfg! instead:

    #[instrument(skip_all)]
    pub fn base_attributes(&self) -> Result<Arc<GitAttributesFile>, ConfigGetError> {
        if cfg!(feature = "git") {
            Ok(Arc::new(GitAttributesFile::new(
                &self.settings().git_settings()?.ignore_filters,
            )))
        } else {
            Ok(Arc::new(GitAttributesFile::default()))
        }
    }

That way we always compile-test both branches and IDEs can better understand both branches too.

Comment thread lib/src/gitattributes.rs
Comment on lines +55 to +59
impl std::fmt::Debug for GitAttributes {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("GitAttributes").finish()
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Not needed?

conflict_marker_style,
eol_conversion_mode: EolConversionMode::None,
fsmonitor_settings: FsmonitorSettings::None,
ignore_filters: Vec::new(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be needed. The user shouldn't be editing LFS files with jj, so they shouldn't need to edit diffs containing changes to LFS files. And even if they did, it would be fine to let them edit the tracked file (the one with a hash in it).

/// The fsmonitor (e.g. Watchman) to use, if any.
pub fsmonitor_settings: FsmonitorSettings,

/// Ignore filters in .gitattributes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a bit more detail? What are the entries here? Here's a possibly better comment (not sure if correct):

/// Names of .gitattributes filters whose matching files should be ignored in the working copy

Comment thread lib/src/gitattributes.rs

// we use std::fs::symlink_metadata to not follow symlinks to follow Git's
// behavior.
let metadata = match std::fs::symlink_metadata(&path) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We usually write this as path.symlink_metadata()

Comment thread lib/src/gitattributes.rs
&self,
priority: SearchPriority,
) -> Result<Arc<SearchAndCollection>, GitAttributesError> {
// we use pin because this is a recursive call

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move this a few lines down so it's just before the Box::pin() call?

Comment thread lib/src/gitattributes.rs
return false;
};
let value = value.as_ref().as_bstr();
ignore_filters.iter().any(|state| value == state)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should we use a HashSet<BString> instead so we don't have to scan the list? Or is the list more or less guaranteed to be very short?

Comment thread lib/src/gitattributes.rs
path: &RepoPath,
ignore_filters: &[String],
priority: SearchPriority,
) -> impl Future<Output = bool>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Make the function async instead of (explicitly) returning a future

@gusinacio

Copy link
Copy Markdown
Author

I'm closing this, there's too much uncertainty on how to handle lfs.

@gusinacio gusinacio closed this Feb 27, 2026
@kejadlen

Copy link
Copy Markdown
Contributor

If we're serious about getting this merged, I don't mind picking it back up to get it over the line.

@martinvonz

Copy link
Copy Markdown
Contributor

@kejadlen: Thanks!

@gusinacio

Copy link
Copy Markdown
Author

@kejadlen go ahead!

@kejadlen

kejadlen commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

New PR here: #9068

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

Successfully merging this pull request may close these issues.

Add support for Git LFS