The function gg is defined by g(x)=x12g(x)=|x-1|-2 . If g(a)=g(0)g(a)=g(0) and a>0a>0, what is the value of aa?