"Duncan Mak" [off-list ref] writes:
I don't think vc-git-registered-file will ever be called with a
filename without a directory, as it is used as a hook on
vc-next-action, which works on a real file.
I am showing my ignorance, but
(1) if it works on a real file then can it ever give you a file
that is in nonexisting directory?
(2) when it works on a file at the root level of the project
tree, say, just "Makefile" wouldn't dir which is the result
of (file-name-directory file) be sometimes nil? I suspect
that is the reason of the original (when dir ...)
In either case, your change would not break anything. I am just
being curious.