Giter Site home page Giter Site logo

Comments (9)

rabisg avatar rabisg commented on July 18, 2024 1

Hi,
I was playing around with the code trying to fix this. I thought I'll just note down my observations:

  • This problem actually originates at gitignore.rs repo. I've raised a bug for this case.
  • Ideally shouldn't the get_all_files fn be gitignore.get_included_files().filter(|fp| !exclude.contains(fp)). The only thing would be it might not honor follow_links
  • I was wondering what's the point of having the follow_links options? It looks like the current code wouldn't handle circular links (upstream gitignore wouldn't either). Also symlinks might point outside the current git directory in which case does it make sense to follow it? And if a file is in the repo but is a symlink won't it get included by the non-symlinked path?

Just my $0.02. Please tell me what you think

from cargo-count.

rabisg avatar rabisg commented on July 18, 2024 1

In that case I can send a pull request to remove this option and replace get_all_files which uses gitignore.get_included_files. Should I go ahead and do that?

from cargo-count.

nabijaczleweli avatar nabijaczleweli commented on July 18, 2024

Any updates on this?

from cargo-count.

kbknapp avatar kbknapp commented on July 18, 2024

@nabijaczleweli Sorry not yet, I've been spending my limited spare time on clap. I'm hoping to get some of this looked at early next week.

from cargo-count.

kbknapp avatar kbknapp commented on July 18, 2024

I was wondering what's the point of having the follow_links options?

I can't remember why I originally added it, but it wasn't really meant to do anything too sophisticated like detecting circular links. In all honesty we could probably remove that options and still be fine.

from cargo-count.

kbknapp avatar kbknapp commented on July 18, 2024

@rabisg I apologize, I've had other projects and my day job take priority here. I'd be more than happy to take a PR on this.

from cargo-count.

Yamakaky avatar Yamakaky commented on July 18, 2024

Seems to be a problem with the .gitignore handling. With an empty crate generated with cargo new, it says there isn't "any file matching the criteria". If I remove the .gitignore, it outputs the line counts as expected.

from cargo-count.

rabisg avatar rabisg commented on July 18, 2024

Just a heads up. My PR got merged in nathankleyn/gitignore.rs#12 and v1.0.6 was released. Since I cannot devote time to this right now if someone wants to update this repo I'll be happy to help

from cargo-count.

Aeledfyr avatar Aeledfyr commented on July 18, 2024

@kbknapp All you should need to do right now to fix this would be to either update the Cargo.toml to have 1.0.6 as the min version for gitignore, or just to remove the Cargo.lock and rebuild. Then you would only need to release a new version to crates.io, and it would work. Even just cloning the repo works right now, just not the version on crates.io.

from cargo-count.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.