Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ddprof-lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ def cloneAPTask = tasks.register('cloneAsyncProfiler') {
println "async-profiler commit hash differs (current: ${currentCommit}, expected: ${commit_lock}), updating..."
exec {
workingDir targetDir.absolutePath
commandLine 'git', 'fetch', 'origin', branch_lock, '--depth', '1'
commandLine 'rm', '-rf', targetDir.absolutePath
}
exec {
commandLine 'git', 'clone', '--branch', branch_lock, 'https://github.com/datadog/async-profiler.git', targetDir.absolutePath
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the depth 1 ?

exec {
  commandLine 'git', 'clone', '--depth', '1', '--branch', branch_lock, 'https://github.com/datadog/async-profiler.git', targetDir.absolutePath
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not allow moving the branch head and locking on a certain commit. It basically defeats the purpose of having the commit hash in the lock.
The async-profiler history is pretty light-weight so we are not saving that much by having just 1 level.
We may revisit this later and maybe lock the branch only and use the commit just as a check for whether we need to refresh the contents?

}
exec {
workingDir targetDir.absolutePath
Expand Down
Loading