diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-05-08 21:39:32 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-05-08 21:39:32 +0900 |
commit | 5a332940ed2f809cb17af7e4d068089b6e1fa6ca (patch) | |
tree | 8f93a6a685cdcbda90f7032c01ce4bcb6fc888fe /tool/lib | |
parent | ba062a623147559ff891d6b52c86b31a1f3f4987 (diff) |
Update revision.h if branch unmatch not only revision [ci skip]
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/vcs.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 3894f9c8e8..563382c927 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -256,8 +256,9 @@ class VCS if branch e = '..' name = branch.sub(/\A(.{#{limit-e.size}}).{#{e.size+1},}/o) {$1+e} - name = name.dump.sub(/\\#/, '#') - code << "#define RUBY_BRANCH_NAME #{name}" + (name = name.dump).gsub!(/\\#/, '#') + comment = " // #{branch}" unless name == %["#{branch}"] + code << "#define RUBY_BRANCH_NAME #{name}#{comment}" end if title title = title.dump.sub(/\\#/, '#') |