Closed IzzySoft closed 1 year ago
The timestamp currently used for git clone is the last commit 😃.
OK, that's a compromise. I just got irritated by all files having the same timestamp (but then, some devs set it to 1980-01-01 for all their files when zipping the module, which is much worse IMHO).
Maybe filing it as lower-prio nice-to-have then? Having all the details in modules.json
(#7) is what I feel most important at the moment (see the index.json
next to my modules.json
for what I've cobbled together currently for easier access in different places). That said, I'd be curious what your road-map says :wink:
In order to save traffic, git clone uses depth=1
, which causes us to not get the last committed
of each file, so we can only set it as the current commit
.
Makes sense, thanks!
git clone
sets the timestamps of files tonow()
(i.e. the time of the clone), which does not reflect their creation or commit times. That way, building a module ZIP from a repo that has not seen any commits for 2 years would result in a module being announced as "brand new". To avoid that, timestamps should be adjusted after cloning and before zipping.To speed up implementation for that, you can find matching Python code here. Quoting for your convenience:
No worries about performance impact, if the author is to be believed. They state it took 0.27s for the entire Bash repo, and still less than a minute for the entire Linux repo even. So it should not even be noticable for a single Magisk module :see_no_evil: