Fix tr bug in gitdup functions