Skip to content

Commit

Permalink
tosquash
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Nov 27, 2024
1 parent 3802730 commit 1ae9b50
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/datadog/ci/git/local_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,14 @@ def self.git_commits
end

def self.git_commits_rev_list(included_commits:, excluded_commits:)
p "git_commits_rev_list"
Telemetry.git_command(Ext::Telemetry::Command::GET_OBJECTS)
included_commits = filter_invalid_commits(included_commits).join(" ")
excluded_commits = filter_invalid_commits(excluded_commits).map! { |sha| "^#{sha}" }.join(" ")

p "included: #{included_commits}"
p "excluded: #{excluded_commits}"

res = nil

duration_ms = Core::Utils::Time.measure(:float_millisecond) do
Expand All @@ -212,18 +216,24 @@ def self.git_commits_rev_list(included_commits:, excluded_commits:)
)
end

p "result: #{res}"

Telemetry.git_command_ms(Ext::Telemetry::Command::GET_OBJECTS, duration_ms)

res
rescue => e
p "error!!!!!!!!!!"
p e
log_failure(e, "git commits rev list")
telemetry_track_error(e, Ext::Telemetry::Command::GET_OBJECTS)
nil
end

def self.git_generate_packfiles(included_commits:, excluded_commits:, path:)
p "git_generate_packfiles"
p path
p "path: #{path}"
p "included_commits: #{included_commits}"
p "excluded_commits: #{excluded_commits}"
return nil unless File.exist?(path)

commit_tree = git_commits_rev_list(included_commits: included_commits, excluded_commits: excluded_commits)
Expand Down

0 comments on commit 1ae9b50

Please sign in to comment.