Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #656 from shuffle2/find-git-ext
Windows: Also look for git.exe in the registry (for Git Extensions installs).
  • Loading branch information
delroth committed Jul 20, 2014
2 parents 963e1a6 + cfc7bb3 commit 4f78ba6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Source/Core/Common/make_scmrev.h.js
Expand Up @@ -8,6 +8,15 @@ var cmd_branch = " rev-parse --abbrev-ref HEAD";

function GetGitExe()
{
try
{
gitexe = wshShell.RegRead("HKCU\\Software\\GitExtensions\\gitcommand");
wshShell.Exec(gitexe);
return gitexe;
}
catch (e)
{}

for (var gitexe in {"git.cmd":1, "git":1, "git.bat":1})
{
try
Expand Down Expand Up @@ -56,7 +65,7 @@ var gitexe = GetGitExe();
var revision = GetFirstStdOutLine(gitexe + cmd_revision);
var describe = GetFirstStdOutLine(gitexe + cmd_describe);
var branch = GetFirstStdOutLine(gitexe + cmd_branch);
var isMaster = +("master" == branch);
var isMaster = +("master" == branch);

// remove hash (and trailing "-0" if needed) from description
describe = describe.replace(/(-0)?-[^-]+(-dirty)?$/, '$2');
Expand Down

0 comments on commit 4f78ba6

Please sign in to comment.