Two things are going against your expectations.
First, ack will ignore symlinks if you don't use the --follow
switch.
Second, and more importantly, ack -g
does not find directories. It only finds files. ack is a file-based utility. It is not a generic utility like find
is.