Re: syncing non-git trees with git-annex

2011-12-14 Thread Joey Hess
Richard Hartmann wrote:
> I would use
> 
>   find -name \*.avi -exec git annex add {} \;

git annex add --not --exclude '*.avi'

The method described does have a problem that the end tree will look
like B, not a merger of A and B. I've posted a comment with details.

-- 
see shy jo


signature.asc
Description: Digital signature
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Re: syncing non-git trees with git-annex

2011-12-14 Thread Klaus Ethgen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
NotDashEscaped: You need GnuPG to verify this message

Am Mi den 14. Dez 2011 um 14:15 schrieb Adam Spiers:
> >  find -name \*.avi -exec git annex add {} \;
> 
> That's substantially less performant, because it forks a whole new
> tree of git / git-annex processes per file.
> 
> If we're getting picky, we should also worry about spaces in
> filenames:
> 
>   find -name \*.avi -print0 | xargs -0 git annex add
> 
> but it was only an example, and to be honest, I didn't even use the
> xargs variant myself; I used zsh's recursive globbing:
> 
>   git annex add **/*.avi

Well, the zsh syntax is fine as long as the matches are not too much. If
the result gets to big your command line would get too big.

On the other hand you can use find as the following:
   find -name \*.avi -exec git annex add {} +

This will not spawn new process for every file but will also work with
more files a command line can hold. And it is even a bit more performant
as the xargs version.

Regards
   Klaus
-- 
Klaus Ethgen  http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen 
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQGcBAEBCgAGBQJO6NRaAAoJEKZ8CrGAGfassbYMAKZTTpHPsrtyOZWBE7V/FcFT
VacmPRHiKWEmA/ovHBXz+EQVo9M1BruYjVck5/WQIN+BCvkHywUQdVVDwuNwXRsD
Gd69+suQK+sPfdLtSkADR0Sgplf3bF4OhLQlAfmCfZEdMlLi8qVgXXA9J7r6EmjR
kTei6Pkf8t0L5fkj4vznJYfG++Xo58Jd/HMsjN1JxbN2/J3RLIEsLhjNjQGLwsKs
4HNj6L/vNyJ4FgvbKLB8117oo3l3cnNCL3hCNHKZZf2HHUHKZKee4+HPmuho14y5
thkGo5cLRZAy32VmO/sVC8b1680pMCzAdUEyNLHTJw376sAYp3ROWWkfaTI5/SL7
De5U+HDfqtje1AaPPCVuu9qFEzTn/jphkJG7GBTg8FDPrrZd2H23ATeMQajKm3hV
aZi2FomKBWg5RkEfioWYYUwsJQvTlu4eycj7IUeDquc2bDnEgmJd+Eeasz2yxXVI
vURUMqj91nXbGpkoKUTxfPUPUdpVk2NNvxMLzpfKCw==
=f0ez
-END PGP SIGNATURE-
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: syncing non-git trees with git-annex

2011-12-14 Thread Richard Hartmann
On Wed, Dec 14, 2011 at 14:15, Adam Spiers  wrote:

> That's substantially less performant, because it forks a whole new
> tree of git / git-annex processes per file.

True.


> Interesting - any particular reason for doing that?

Mainly that I will keep my repos for as long as I can reasonably plan
ahead and that I will _know_ that there is crud which I can not
remove, ever. I.e. just cleanliness.
Similar to how some people like to make their beds, even though it's
more work and actually less "healthy" to do so.


Richard
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: syncing non-git trees with git-annex

2011-12-14 Thread Adam Spiers
On Wed, Dec 14, 2011 at 12:53 PM, Richard Hartmann
 wrote:
> I would use
>
>  find -name \*.avi -exec git annex add {} \;

That's substantially less performant, because it forks a whole new
tree of git / git-annex processes per file.

If we're getting picky, we should also worry about spaces in
filenames:

  find -name \*.avi -print0 | xargs -0 git annex add

but it was only an example, and to be honest, I didn't even use the
xargs variant myself; I used zsh's recursive globbing:

  git annex add **/*.avi

but I thought that might confuse non-zsh users so I replaced it with
xargs in the example :-)

> but other than that, this seems fine.

Great, thanks!

> Depending on your level of OCD,
> it might make sense to throw away the initial repo once your data is
> clean and import everything in a clean one. That's what I do.

Interesting - any particular reason for doing that?

> PS: There are various tools for finding duplicates, but git-annex
> gives you this functionality for free, so..

Yes, this one is particularly good:

  http://sourceforge.net/projects/fastdup/

but using git-annex facilitates it in a much more distributed fashion.
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: syncing non-git trees with git-annex

2011-12-14 Thread Richard Hartmann
I would use

  find -name \*.avi -exec git annex add {} \;

but other than that, this seems fine. Depending on your level of OCD,
it might make sense to throw away the initial repo once your data is
clean and import everything in a clean one. That's what I do.


Richard

PS: There are various tools for finding duplicates, but git-annex
gives you this functionality for free, so..
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


syncing non-git trees with git-annex

2011-12-13 Thread Adam Spiers
How close to / far from the mark am I on this?

http://git-annex.branchable.com/forum/syncing_non-git_trees_with_git-annex

Thanks!
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home