git annex map does not spot graph loops
Adam Spiers
vcs-home at adamspiers.org
Sun Dec 4 15:26:15 CET 2011
I set up two git annex repos on the local machine which point to each
other and then run git annex map, it chews up a load of CPU,
presumably trying to traverse the cyclic repository graph without ever
noticing there's a loop:
% mkdir -p annex-test/{a,b}
% cd annex-test/a
% git init
Initialized empty Git repository in /home/adam/tmp/2/annex-test/a/.git/
% git annex init
init ok
% cd ../b
% git init
Initialized empty Git repository in /home/adam/tmp/2/annex-test/b/.git/
% git annex init
init ok
% git remote add a ../a
% cd ../a
% git remote add b ../b
% time git annex map > map.out 2>&1
git annex map > map.out 2>&1 25.67s user 4.38s system 93% cpu 32.238 total
% head -n10 map.out
map /home/adam/tmp/2/annex-test/a ok
map b ok
map a ok
map b ok
map a ok
map b ok
map a ok
map b ok
map a ok
map b ok
% dd if=map.dot bs=1k count=1
digraph map {
subgraph "cluster_localhost" {
label="localhost"
style="filled"
fillcolor="lightblue"
"/home/adam/tmp/2/annex-test/a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b1+0
records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.000182134 s, 5.6 MB/s
More information about the vcs-home
mailing list