Comments (3)
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.
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.
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)
- fatal: mmap failed: Cannot allocate memory HOT 10
- git-find-uncommitted-repos: readlink problem HOT 2
- doco : add example of use, e.g. git restore-mtime HOT 3
- Change the mtime milliseconds/microseconds to the git commit hash HOT 25
- [restore-mtime] Add instructions for GitHub Actions in documentation HOT 5
- Problem with default value of --git-dir parameter HOT 3
- Add sources for man pages in a convenient format HOT 6
- Not all folders are updated HOT 3
- Add tests for `restore-mtime`
- Option not to touch files with earlier date/time HOT 11
- Timestamp
- git-restore-mtime ignore modified files in working directory HOT 4
- A --skip option for restore-mtime? HOT 6
- restore-mtime: AttributeError: 'Git' object has no attribute '_proc' HOT 1
- SyntaxError: invalid syntax on Python 3.4.3 HOT 1
- RFC: Allow silencing warnings (and perhaps errors)
- Problem inside Python 'check_arg_types' HOT 12
- normalize file path exception 'utf-8' codec can't decode byte 0xe1 in position 7: invalid continuation byte, input_file_path: "Get_krv\341canie_LMWH.ipynb" HOT 2
- Homebrew support HOT 7
- restore-mtime - git-commit-by-mtime - export of untracked code by mtime HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-tools.