emacs-repository-get-version

emacs-repository-get-version is a compiled Lisp function in `version.el'.

(emacs-repository-get-version &optional DIR EXTERNAL)

Try to return as a string the repository revision of the Emacs sources.
The format of the returned string is dependent on the VCS in use.
Value is nil if the sources do not seem to be under version
control, or if we could not determine the revision. Note that
this reports on the current state of the sources, which may not
correspond to the running Emacs.

Optional argument DIR is a directory to use instead of
`source-directory'. Optional argument EXTERNAL non-nil means to
maybe ask the VCS itself, if the sources appear to be under
version control. If `force', always ask. the VCS. Otherwise
only ask the VCS if we cannot find any information ourselves.