Giter Site home page Giter Site logo

Comments (10)

ggreer avatar ggreer commented on May 22, 2024

Thanks for submitting this bug report, but can you give me more info? It'd be handy to see:

  • The line in your .gitignore that ignores the log files.
  • The paths to the .gitignore file and log file.
  • The parameters you're passing to ag and the directory you're running it in.

Without this information, it's really hard for me to reproduce the bug. If I can't reproduce it, I can't fix it.

from the_silver_searcher.

rstacruz avatar rstacruz commented on May 22, 2024

In the report above, the ignore line is /logs/*.log. The command was ag hello. It was ran on the git repo. It's easily-reproduceable too:

from the_silver_searcher.

rstacruz avatar rstacruz commented on May 22, 2024

I deleted my long paste comment and put it in a gist here. I hope this helps. https://gist.github.com/ef4af99306276aa31637

from the_silver_searcher.

ggreer avatar ggreer commented on May 22, 2024

Thanks for giving me a failure case.

echo "/logs/*.log" > .gitignore

I'm just running fnmatch on the lines, so specifying a path doesn't work. I knew git allowed paths but totally spaced on adding support for it.

Fixing this will probably take me a little while. Be patient.

from the_silver_searcher.

rstacruz avatar rstacruz commented on May 22, 2024

These gitignore lines don't work with ag either:

/logs
/logs/
logs/*
/logs/file.log
logs/file.log

These work:

logs
file.log

...all of these will ignore the file in question in Git.

from the_silver_searcher.

ggreer avatar ggreer commented on May 22, 2024

Just FYI, I haven't forgotten about this issue. Fixing it requires quite a few changes, since scandir() doesn't pass the current path to the filter function that it calls on each directory entry. I might start off with a half-assed fix that uses a global, but I'd prefer to make this easier to parallelize. The right solution is to write my own scandir().

But replacing scandir with my own equivalent might cause some problems.

from the_silver_searcher.

cabello avatar cabello commented on May 22, 2024

I was having this issue, I sent you a pull request trying to help you to close it.

from the_silver_searcher.

 avatar commented on May 22, 2024

Same problem here.

from the_silver_searcher.

ggreer avatar ggreer commented on May 22, 2024

Ok, this should be fixed now.

from the_silver_searcher.

jmuheim avatar jmuheim commented on May 22, 2024

Thank you!

from the_silver_searcher.

Related Issues (20)

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.