Issue #13445 has been updated by MSP-Greg (Greg L).


Please close.

I fixed the issue based on looking into [tool/vsc.rb](https://github.com/ruby/ruby/blob/2103197ccebe4f6efea1e4160d46471396507d6b/tool/vcs.rb) only where my error was.

Nobu fixed the issue based on everywhere in the file it should be changed. See [svn 58387 or commit 2103197](https://github.com/ruby/ruby/commit/2103197ccebe4f6efea1e4160d46471396507d6b)

Thank you.

----------------------------------------
Bug #13445: MinGW, GIT, revision.h, vcs.rb
https://bugs.ruby-lang.org/issues/13445#change-64307

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-04-17 trunk 58383) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
When generating a MinGW build from a local repo, the revision.h file does not exist, and is create by [`tool/file2lastrev.rb`](https://github.com/ruby/ruby/blob/trunk/tool/file2lastrev.rb) which requires [`tool/vcs.rb`](https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb).

On windows/MinGW, one often needs to specify a `git.exe` location, which can be done using the `--with-git=` configure option, created via [`win32/configure.bat`](https://github.com/ruby/ruby/blob/trunk/win32/configure.bat).  This setting is not picked up via `vcs.rb`.

See [GitHub PR #1557](https://github.com/ruby/ruby/pull/1587)

Adds the following code to the top of `vcs.rb`

```ruby
# If specified in configure options, adds git location to PATH for MinGW builds
if (t = ENV['GIT']) && File.exist?(t)
  ENV['PATH'] = "#{File.dirname(t)}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
end
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>