navid/veins / 8001ccbc234ab3479679a23a66b0fff347c6f6939e03b5ab60d12d941695716e / xveins/src/merge/merge.h

merge.h

← xveins/src/merge · 884 bytes · raw · download

#pragma once

#include "store/store.h"

#include <optional>
#include <string>
#include <vector>

namespace vn {

// Detect renames between two trees. `tx` may be provided so trees and blobs
// that have only been added to the pending transaction are visible. Results are
// sorted by (parent_index, to_path).
std::vector<Rename> detect_renames(Store& store, Txn* tx, std::optional<Id> old_tree,
                                   std::optional<Id> new_tree, int similar_pct,
                                   std::uint64_t parent_index);

// Configured rename similarity threshold (0 disables detection).
int rename_similar_pct(const fs::path& root);

int merge_run(const std::vector<std::string>& args);
int rebase_run(const std::vector<std::string>& args);
int xs_run(const std::vector<std::string>& args);
int resolve_run(const std::vector<std::string>& args);

} // namespace vn