Fixes <https://issues.guix.gnu.org/issue/65979>.
* guix/hash.scm (%vcs-directories): New variable.
(vcs-file?): Add optional argument for passing VCS kind of the
file/repository.
(file-hash*): Adjust accordingly.
(vcs-file-predicate): New procedure and export it.
* guix/scripts/hash.scm (guix-hash)[file-hash]: Use it.
Change-Id: I8e286c3426ddefd664dc3a471d5a09e309824faa