Code Monkey home page Code Monkey logo

Comments (3)

MestreLion avatar MestreLion commented on July 24, 2024

Thanks for the compliments! :)

As for dir mtime, it's already in the source code TO-DO list, but to be honest it can take forever for me to code new features for this script.

Still, dir mtime usually works differently than your suggestion: modifying a file does not change the dir mtime, only adding, renaming or deleting a file does. So the latest file mtime is not necessarily the mtime of its dir: that can be earlier (if latest file was just modified) or later (if a file was deleted). Properly coding this behavior can be quite tricky, specially considering deletions, which so far I've ignored.

Also I think it would require a set of all paths in repo (respecting the pathspec filter, if any), similar to the file set, so any given dir is only touched once.

Your suggestion seems a lot simpler to code, and it can be done with a simple post-processing bash script. But, being different than the standard dir mtime, is there a valid use-case for that?

Anyway, patches welcome! :D

from git-tools.

MestreLion avatar MestreLion commented on July 24, 2024

Nothing like user request to motivate me to dive in coding again :)

So, I've added a --directories|-d option to handle directories... care to test it? Also, if you can throughly test it in several repos, and there is no major performance hit, I may even make this option be default.

from git-tools.

 avatar commented on July 24, 2024

Duuuuuuude you rock!

Yeah, I was worried about the impossibility of deriving the true dir mtime, but I figured anytime in the past is more useful than "right now" after cloning a repo.

I'll make sure to give it a test when I get into work tomorrow

Sent from my iPhone

On Apr 10, 2014, at 5:22 PM, Rodrigo Silva [email protected] wrote:

Nothing like user request to motivate me to dive in coding again :)

So, I've added a --directories|-d option to handle directories... care to test it? Also, if you can throughly test it in several repos, and there is no major performance hit, I may even make this option be default.


Reply to this email directly or view it on GitHub.

from git-tools.

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.