Ну чтобы не бояться не быть полезным - Git without actual storage
[Recent Entries][Archive][Friends][User Info]
01:57 am
[Link] |
Git without actual storage There is something in the direction of Git made useful as a cache-controlling system ("forward-only DVCS"):
To prepare the index (Git's working field), there is no need in having the objects with the actual content in the store:
git-update-index - Register file contents in the working tree to the index ...
USING --CACHEINFO OR --INFO-ONLY --cacheinfo is used to register a file that is not in the current working directory. This is useful for minimum-checkout merging.
To pretend you have a file with mode and sha1 at path, say: $ git update-index --cacheinfo mode sha1 path
--info-only is used to register files without placing them in the object database. This is useful for status-only repositories.
Both --cacheinfo and --info-only behave similarly: the index is updated but the object database isn't. --cacheinfo is useful when the object is in the database but the file isn't available locally. --info-only is useful when the file is available, but you do not wish to update the object database.
...
So, the documentation of Git calls the type of repositories I'm thinking of status-only repositories. Right.
Also, tree objects can be stored without storing the files:
git-write-tree - Create a tree object from the current index ... --missing-ok Normally git-write-tree ensures that the objects referenced by the directory exist in the object database. This option disables this check. ...
To sum up, cache-management that I have been thinking about is basically possible with Git.
(Backup management, that I also have been thinking about (...), does not seem to be also conveniently possible in Git primitives. Will think more.)
|
|
|
| From: | imz |
Date: | July 8th, 2013 - 07:01 pm |
---|
| | git-annex | (Link) |
|
|
|