Skip to content

Commit

Permalink
Git branch name can contain #{} too
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jul 7, 2019
1 parent 19a4c42 commit fc4dd7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tool/file2lastrev.rb
Expand Up @@ -69,7 +69,8 @@ def self.output=(output)
e = '..'
limit = @limit
name = branch.sub(/\A(.{#{limit-e.size}}).{#{e.size+1},}/o) {$1+e}
"#define RUBY_BRANCH_NAME #{name.dump}"
name = name.dump.sub(/\\#/, '#')
"#define RUBY_BRANCH_NAME #{name}"
end,
if title
title = title.dump.sub(/\\#/, '#')
Expand Down

0 comments on commit fc4dd7d

Please sign in to comment.