Skip blame-ignored revisions [ci skip]
This commit is contained in:
parent
e667bb70cf
commit
42cf301254
@ -524,11 +524,23 @@ class VCS
|
|||||||
proc do |w|
|
proc do |w|
|
||||||
w.print "-*- coding: utf-8 -*-\n"
|
w.print "-*- coding: utf-8 -*-\n"
|
||||||
w.print "\n""base-url = #{base_url}\n" if base_url
|
w.print "\n""base-url = #{base_url}\n" if base_url
|
||||||
|
|
||||||
|
begin
|
||||||
|
ignore_revs = File.readlines(File.join(@srcdir, ".git-blame-ignore-revs"), chomp: true)
|
||||||
|
.grep_v(/^ *(?:#|$)/)
|
||||||
|
.to_h {|v| [v, true]}
|
||||||
|
ignore_revs = nil if ignore_revs.empty?
|
||||||
|
rescue Errno::ENOENT
|
||||||
|
end
|
||||||
|
|
||||||
cmd_pipe(env, cmd, chdir: @srcdir) do |r|
|
cmd_pipe(env, cmd, chdir: @srcdir) do |r|
|
||||||
r.gets(sep = "commit ")
|
r.gets(sep = "commit ")
|
||||||
sep = "\n" + sep
|
sep = "\n" + sep
|
||||||
while s = r.gets(sep, chomp: true)
|
while s = r.gets(sep, chomp: true)
|
||||||
h, s = s.split(/^$/, 2)
|
h, s = s.split(/^$/, 2)
|
||||||
|
if ignore_revs&.key?(h[/\A\h{40}/])
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
next if /^Author: *dependabot\[bot\]/ =~ h
|
next if /^Author: *dependabot\[bot\]/ =~ h
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user