Skip to content

Commit ef17ec4

Browse files
committed
[DOC] Add base-url to ChangeLog by default
1 parent 912cf81 commit ef17ec4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tool/lib/vcs.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def branch_beginning(url)
453453
#{url.to_str} -- version.h include/ruby/version.h])
454454
end
455455

456-
def export_changelog(url = '@', from = nil, to = nil, _path = nil, path: _path, base_url: nil)
456+
def export_changelog(url = '@', from = nil, to = nil, _path = nil, path: _path, base_url: true)
457457
from, to = [from, to].map do |rev|
458458
rev or next
459459
rev unless rev.empty?
@@ -476,6 +476,7 @@ def export_changelog(url = '@', from = nil, to = nil, _path = nil, path: _path,
476476
arg = ["--since=25 Dec 00:00:00", to]
477477
end
478478
if base_url == true
479+
env = CHANGELOG_ENV
479480
remote, = upstream
480481
if remote &&= cmd_read(env, %W[#{COMMAND} remote get-url --no-push #{remote}])
481482
remote.chomp!
@@ -494,9 +495,10 @@ def export_changelog(url = '@', from = nil, to = nil, _path = nil, path: _path,
494495
end
495496

496497
LOG_FIX_REGEXP_SEPARATORS = '/!:;|,#%&'
498+
CHANGELOG_ENV = {'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'}
497499

498500
def changelog_formatter(path, arg, base_url = nil)
499-
env = {'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'}
501+
env = CHANGELOG_ENV
500502
cmd = %W[#{COMMAND} log
501503
--format=fuller --notes=commits --notes=log-fix --topo-order --no-merges
502504
--fixed-strings --invert-grep --grep=[ci\ skip] --grep=[skip\ ci]

0 commit comments

Comments
 (0)