tag.c: implement '--merged' and '--no-merged' options