When adding files to git annex, softlinks are created with current atime (and ctime, etc). Instead, the atime of the added file should be used and added to the meta-data, restoring it everywhere an annex is cloned to. -- RichiH
2011-03-13 20:32:12 +00:00
Optionally, editing the meta-data should change the times in all annexes.
> Thing is, git does not preserve file timestamps much at all.
> It's not uncommon for a `git checkout` to or `git update` to
> mess up timestamps. This is why things like metastore exist (and
> metastore should work ok with git annexed files too). Trying to
> make annexed file symlinks have better timestamp handling than regular
> files in git seems pointless. --[[Joey]]
2011-03-14 13:47:38 +00:00
> > Improving an area where git is (not yet?) good at still makes sense, imo. Photos and the like need absolute timestamps more than source code which is fine with relative timestamps (local builds & updates). Maintaining global timestamps for source code could even cause a lot of unwanted effects. As it is, this issue is the only, but a major, blocker for me before I can start adapting git-annex. As I have three different use cases for it, this is a shame. Unfortunately, I don't speak any Haskell so scratching my own itch isn't do-able (without major effort and not soon, at least). Is there a realistic chance that you will tackle this nonetheless or is this WONTFIX? -- RichiH
>>> Not quite WONTFIX. git-annex should at least, when adding new files,
>>> preserve their timestamp in the symlink it creates.
>>>
>>> Since it doesn't have anything to do with maintaining the symlinks
>>> during an update, or a clone, etc, maintaining the permissions of them
>>> is also out of scope, and it's best to just use metastore if you need
>>> it. Otherwise, git-annex would have to reimplement metastore, and is
>>> unlikely to do it better.
2011-03-14 17:00:38 +00:00
>>>> OK, thanks for the clarification. Would it be acceptable for you to put the timestamps into the metastore with vanilla git? If such an option existed, everyone would be able to benefit and not just me. -- RichiH
>>>>>> Thanks a lot. Doing this in a new git-annex repo from the start should at least ensure local consistency and I assume I can simply add a post-pull hook to restore the mtimes on all all other repositories? -- RichiH
2011-03-22 21:25:29 +00:00
>>>>>>> This is even better:
#!/bin/sh
2011-03-22 22:59:55 +00:00
if ! type metastore >/dev/null; then echo "$0: metastore is not installed; exiting"; exit 1; fi
2011-03-22 21:25:29 +00:00
git annex pre-commit .
metastore --save
git add .metadata
>>>>>>> -- RichiH
2011-03-23 09:53:16 +00:00
>>>>>>>> After getting to actually play with this from different machines with a bare git as central instance for several distributed repos, the metastore trick does not work. The .metadata is causing merge conflicts for every pull. I removed the "done" tag from this issue. -- RichiH
2011-03-31 20:25:07 +00:00
>>>>>>>>> softbox sounds _really_ nice. File systems need to preserve mtimes. Oviously, it would be nice if git-annex exposed this to the upper layer instead of relying on this FUSE implementation, or the next, or the other totally cool thing around the corner to implement it again and again.
>>>>>>>>> I talked to the author of metastore; he is aware that the format is merge-unfriendly but never needed merges for himself. He is aware that this is not ideal for something like git. He does not have the time to implement a text storage instead of binary and I lack the skills to do it. If metastore is used, all it would need to do is introduce a new version of the store (it's versioned, apparently) and save metadata in text, one file per line. xattr would need to be ASCII-armoured, the rest could be plain text. I still think storing this directly in git-annex would make the most sense. Introducing a metadata storage file per storage object in .git/annex and using the object file's name as index is impossible because several softlinks might point to one object so it would need to be done per-softlink :/ -- RichiH