You need to sign in or sign up before continuing.
[Code Indexer] Set from_sha as NullTree Sha instead of empty string if force_push=true
Context
From #568836 (comment 2742782759):
Gitlab::Elastic::Indexer
never setsfrom_sha
to""
, ifpurge_unreachable_commits_from_index?
is true, it sets it toempty_tree_id
. This results in an additional call to gitalygetDefaultSHAFromHash
in the indexer. Should we replicate the same logic inAi::ActiveContext::Code::Indexer
?
Proposal
In Ai::ActiveContext::Code::Indexer#determine_shas_and_force_reindex_flag
, use the NullTree Sha (empty_tree_id
) if force_push? = true
.
Edited by Pam Artiaga