Fix "git reset" failing with identical file/tree names

"git reset foo" fails, if there is a file *and* a tree named "foo" in
the current repository.  Hence, pass "--" at appropriate places to
unambiguously determine the type of argument given to "git reset".

I didn't test this patch thoroughly, please review carefully.