made log end option optional, defaults to HEAD