When repo is used, with git, 'clang --version' option does not display the correct revision information (i.e. '--version' option does not display correct version
information (i.e.git hashes on TOP) as the following:
clang version 6.0.0 (should be) --> clang version 6.0.0 (.../clang.git "clang's git hash on top") (.../llvm.git "llvm's git hash on top")
This is because repo also creates .git/svn folder as git-svn does and this makes repo with git uses "git svn info" command, Git hashes).which is only for git-svn, This change makes the parsing of the
version info correctly recognize svn,to retrieve its revision information, making null for the info. To correctly distinguish between git-svn and repo with git, git-svn and repo directory
because repo also has .git/svn.the folder hierarchy to specify for git-svn should be .git/svn/refs as the "git svn info" command depends on the revision data in .git/svn/refs. This patch in turn makes repo with git passes through to the third macro, This in turn enables the option displays
correct version informaget_source_info_git, in get_source_info function with repo., Tresulting in correctly retrieving the revision information for repo with git using "git log ..." command.
This patch is tested with git, svn, git-svn
, and repo with this changegit.