more git-annex plumbing

Joey Hess joey at kitenet.net
Mon Apr 16 23:01:22 CEST 2012


Thomas Koch wrote:
> Hi,
> 
> I have a few things that I'd like to do with git-annex but that are hard 
> because git-annex does not expose internal plumbing commands. I intend to 
> start a list of such commands here with possible use cases:
> 
> - calculate checksum of a file
> - doesAnnexHasChecksum?
> - doesAnnexHasFile?
>
>   Useful to deduplicate files from many old CD backups

git annex find --format can be used to get at this to some extent.
But I'd instead suggest to just add the files, let git-annex deduplicate
the data, which it does automatically, and if desired dedup the
filenames afterwards.

> - checksum to path
> - move file into annex
> 
>   You already have an annexed file somewhere on the disk and just want to move 
> it in the local annex without copying it

Sounds like the reinject command, I think?

> - find duplicates
> 
>   It might happen that a file is put into an annex in multiple places. One 
> could try to find duplicate symlinks, but that's inefficient. As I understand, 
> the git-annex data should allow a quick lookup of all symlinks pointing to a 
> particular checkum.

http://git-annex.branchable.com/tips/finding_duplicate_files/

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.madduck.net/pipermail/vcs-home/attachments/20120416/3d293b80/attachment.pgp>


More information about the vcs-home mailing list