Skip to content

Commit

Permalink
Add sort for reproducible builds
Browse files Browse the repository at this point in the history
  • Loading branch information
znz committed Jun 5, 2024
1 parent 9aaeb8b commit 102b555
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/bitclust/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def entries(rel)
Dir.entries(realpath(rel))\
.reject {|ent| /\A[\.=]/ =~ ent }\
.map {|ent| decodeid(ent) }
.sort
rescue Errno::ENOENT
return []
end
Expand Down
2 changes: 1 addition & 1 deletion lib/bitclust/refsdatabase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def save(s)
io = s
end

@h.each{|k, v|
@h.sort.each{|k, v|
io.write( [k, v].flatten.map{|e| e.gsub(/,/, '\\,') }.join(',') + "\n" )
}
io.close
Expand Down

0 comments on commit 102b555

Please sign in to comment.