Hello emacs-devel, "vc-git-mode-line-string" (which is called automatically) failed occasionally with an error message (wrong-type-argument arrayp nil) when the default-directory is outside the repository. I hunted the error down to "vc-working-revision" function, which returned nil under those particular circumstances. The returned value (nil) was then passed to as an argument to "substring", causing a type error. If there are better ways to resolve this issue, I would be very happy to discover them. Nonetheless I've seen such approach of "let"-ing the default-directory variable a few times across the emacs source code tree. Would doing this on a lower level, for example in "vc-call-backend" be a better approach?