const (
// ConfigBlobCacheFailOnMissingSubmodules is the name of the configuration option for
// BlobCache.Configure() to check if the referenced submodules are registered in .gitignore.ConfigBlobCacheFailOnMissingSubmodules = "BlobCache.FailOnMissingSubmodules"
// DependencyBlobCache identifies the dependency provided by BlobCache.DependencyBlobCache = "blob_cache"
)

const (
// DependencyDay is the name of the dependency which DaysSinceStart provides - the number
// of days since the first commit in the analysed sequence.DependencyDay = "day"
// FactCommitsByDay contains the mapping between day indices and the corresponding commits.FactCommitsByDay = "DaysSinceStart.Commits"
)

const (
// ConfigFileDiffDisableCleanup is the name of the configuration option (FileDiff.Configure())
// to suppress diffmatchpatch.DiffCleanupSemanticLossless() which is supposed to improve
// the human interpretability of diffs.ConfigFileDiffDisableCleanup = "FileDiff.NoCleanup"
// DependencyFileDiff is the name of the dependency provided by FileDiff.DependencyFileDiff = "file_diff"
// ConfigFileWhitespaceIgnore is the name of the configuration option (FileDiff.Configure())
// to suppress whitespace changes which can pollute the core diff of the filesConfigFileWhitespaceIgnore = "FileDiff.WhitespaceIgnore"
)

const (
// RenameAnalysisDefaultThreshold specifies the default percentage of common lines in a pair
// of files to consider them linked. The exact code of the decision is sizesAreClose().
// CGit's default is 50%. Ours is 80% because 50% can be too computationally expensive.RenameAnalysisDefaultThreshold = 80
// ConfigRenameAnalysisSimilarityThreshold is the name of the configuration option
// (RenameAnalysis.Configure()) which sets the similarity threshold.ConfigRenameAnalysisSimilarityThreshold = "RenameAnalysis.SimilarityThreshold"
// RenameAnalysisMinimumSize is the minimum size of a blob to be considered.RenameAnalysisMinimumSize = 32
// RenameAnalysisMaxCandidates is the maximum number of rename candidates to consider per file.RenameAnalysisMaxCandidates = 50
// RenameAnalysisSetSizeLimit is the maximum number of added + removed files for
// RenameAnalysisMaxCandidates to be active; the bigger numbers set it to 1.RenameAnalysisSetSizeLimit = 1000
// RenameAnalysisByteDiffSizeThreshold is the maximum size of each of the compared parts
// to be diff-ed on byte level.RenameAnalysisByteDiffSizeThreshold = 100000
)

const (
// DependencyTreeChanges is the name of the dependency provided by TreeDiff.DependencyTreeChanges = "changes"
// ConfigTreeDiffEnableBlacklist is the name of the configuration option
// (TreeDiff.Configure()) which allows to skip blacklisted directories.ConfigTreeDiffEnableBlacklist = "TreeDiff.EnableBlacklist"
// ConfigTreeDiffBlacklistedPrefixes s the name of the configuration option
// (TreeDiff.Configure()) which allows to set blacklisted path prefixes -
// directories or complete file names.ConfigTreeDiffBlacklistedPrefixes = "TreeDiff.BlacklistedPrefixes"
// ConfigTreeDiffLanguages is the name of the configuration option (TreeDiff.Configure())
// which sets the list of programming languages to analyze. Language names are at
// https://doc.bblf.sh/languages.html Names are joined with a comma ",".
// "all" is the special name which disables this filter.ConfigTreeDiffLanguages = "TreeDiff.LanguagesDetection"
// ConfigTreeDiffFilterRegexp is the name of the configuration option
// (TreeDiff.Configure()) which makes FileDiff consider only those files which have names matching this regexp.ConfigTreeDiffFilterRegexp = "TreeDiff.FilteredRegexes"
)

DiffBytes calculates the approximated number of different bytes between two binary buffers.
We are not interested in the diff script itself. Instead, we track the sizes of `db` and `eb`
from the original implementation.

type BlobCache struct {
core.NoopMerger// Specifies how to handle the situation when we encounter a git submodule - an object
// without the blob. If true, we look inside .gitmodules and if we don't find it,
// raise an error. If false, we do not look inside .gitmodules and always succeed.FailOnMissingSubmodulesbool// contains filtered or unexported fields
}

BlobCache loads the blobs which correspond to the changed files in a commit.
It is a PipelineItem.
It must provide the old and the new objects; "blobCache" rotates and allows to not load
the same blobs twice. Outdated objects are removed so "blobCache" never grows big.

Consume runs this PipelineItem on the next commit data.
`deps` contain all the results from upstream PipelineItem-s as requested by Requires().
Additionally, DependencyCommit is always present there and represents
the analysed *object.Commit. This function returns the mapping with analysis
results. The keys must be the same as in Provides(). If there was an error,
nil is returned.

Provides returns the list of names of entities which are produced by this PipelineItem.
Each produced entity will be inserted into `deps` of dependent Consume()-s according
to this list. Also used by core.Registry to build the global map of providers.

Consume runs this PipelineItem on the next commit data.
`deps` contain all the results from upstream PipelineItem-s as requested by Requires().
Additionally, DependencyCommit is always present there and represents the analysed *object.Commit.
This function returns the mapping with analysis results. The keys must be the same as
in Provides(). If there was an error, nil is returned.

Provides returns the list of names of entities which are produced by this PipelineItem.
Each produced entity will be inserted into `deps` of dependent Consume()-s according
to this list. Also used by core.Registry to build the global map of providers.

Consume runs this PipelineItem on the next commit data.
`deps` contain all the results from upstream PipelineItem-s as requested by Requires().
Additionally, DependencyCommit is always present there and represents the analysed *object.Commit.
This function returns the mapping with analysis results. The keys must be the same as
in Provides(). If there was an error, nil is returned.

Provides returns the list of names of entities which are produced by this PipelineItem.
Each produced entity will be inserted into `deps` of dependent Consume()-s according
to this list. Also used by core.Registry to build the global map of providers.

Consume runs this PipelineItem on the next commit data.
`deps` contain all the results from upstream PipelineItem-s as requested by Requires().
Additionally, DependencyCommit is always present there and represents the analysed *object.Commit.
This function returns the mapping with analysis results. The keys must be the same as
in Provides(). If there was an error, nil is returned.

Provides returns the list of names of entities which are produced by this PipelineItem.
Each produced entity will be inserted into `deps` of dependent Consume()-s according
to this list. Also used by core.Registry to build the global map of providers.

type LineStats struct {
// Added is the number of added lines by a particular developer in a particular day.Addedint// Removed is the number of removed lines by a particular developer in a particular day.Removedint// Changed is the number of changed lines by a particular developer in a particular day.Changedint
}

Consume runs this PipelineItem on the next commit data.
`deps` contain all the results from upstream PipelineItem-s as requested by Requires().
Additionally, DependencyCommit is always present there and represents the analysed *object.Commit.
This function returns the mapping with analysis results. The keys must be the same as
in Provides(). If there was an error, nil is returned.

Provides returns the list of names of entities which are produced by this PipelineItem.
Each produced entity will be inserted into `deps` of dependent Consume()-s according
to this list. Also used by core.Registry to build the global map of providers.

type RenameAnalysis struct {
core.NoopMerger// SimilarityThreshold adjusts the heuristic to determine file renames.
// It has the same units as cgit's -X rename-threshold or -M. Better to
// set it to the default value of 80 (80%).SimilarityThresholdint// contains filtered or unexported fields
}

RenameAnalysis improves TreeDiff's results by searching for changed blobs under different
paths which are likely to be the result of a rename with subsequent edits.
RenameAnalysis is a PipelineItem.

Consume runs this PipelineItem on the next commit data.
`deps` contain all the results from upstream PipelineItem-s as requested by Requires().
Additionally, DependencyCommit is always present there and represents the analysed *object.Commit.
This function returns the mapping with analysis results. The keys must be the same as
in Provides(). If there was an error, nil is returned.

Provides returns the list of names of entities which are produced by this PipelineItem.
Each produced entity will be inserted into `deps` of dependent Consume()-s according
to this list. Also used by core.Registry to build the global map of providers.

TreeDiff generates the list of changes for a commit. A change can be either one or two blobs
under the same path: "before" and "after". If "before" is nil, the change is an addition.
If "after" is nil, the change is a removal. Otherwise, it is a modification.
TreeDiff is a PipelineItem.

Consume runs this PipelineItem on the next commit data.
`deps` contain all the results from upstream PipelineItem-s as requested by Requires().
Additionally, DependencyCommit is always present there and represents the analysed *object.Commit.
This function returns the mapping with analysis results. The keys must be the same as
in Provides(). If there was an error, nil is returned.

Provides returns the list of names of entities which are produced by this PipelineItem.
Each produced entity will be inserted into `deps` of dependent Consume()-s according
to this list. Also used by core.Registry to build the global map of providers.