馃Ч cmd/gitserver: Remove method setLastError as it's only used once
Created by: indradhanush
Started working on #38616 when I noticed this.
Also, update misleading comment about logging error (see commit message).
setLastError
is not referenced anywhere else.
Test plan
Existing build should pass as there's no change in functionality.