Skip to content

Commit

Permalink
Delete everything related to thrift GitTrees
Browse files Browse the repository at this point in the history
Summary: We don't use this as a derived data type anymore so we should be able to delete and get rid of this type completely.

Reviewed By: andreacampi

Differential Revision: D69467793

fbshipit-source-id: 9816415e810210c5b8bb31f1b2c88128fc7b00f5
  • Loading branch information
RajivTS authored and facebook-github-bot committed Feb 14, 2025
1 parent d6f49bd commit 8398943
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 958 deletions.
1 change: 0 additions & 1 deletion eden/mononoke/bookmarks/warm_bookmarks_cache/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ impl WarmBookmarksCacheBuilder {
)),
DerivableType::TestManifests => None,
DerivableType::TestShardedManifests => None,
DerivableType::GitTrees => None,
}
}

Expand Down
2 changes: 0 additions & 2 deletions eden/mononoke/derived_data/bulk_derivation/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use futures::StreamExt;
use futures::TryStreamExt;
use git_types::MappedGitCommitId;
use git_types::RootGitDeltaManifestV2Id;
use git_types::TreeHandle;
use mercurial_derivation::MappedHgChangesetId;
use mercurial_derivation::RootHgAugmentedManifestId;
use mononoke_macros::mononoke;
Expand Down Expand Up @@ -328,7 +327,6 @@ fn manager_for_type(
Arc::new(SingleTypeManager::<RootContentManifestId>::new(manager))
}
DerivableType::ChangesetInfo => Arc::new(SingleTypeManager::<ChangesetInfo>::new(manager)),
DerivableType::GitTrees => Arc::new(SingleTypeManager::<TreeHandle>::new(manager)),
DerivableType::GitCommits => Arc::new(SingleTypeManager::<MappedGitCommitId>::new(manager)),
DerivableType::GitDeltaManifestsV2 => {
Arc::new(SingleTypeManager::<RootGitDeltaManifestV2Id>::new(manager))
Expand Down
2 changes: 0 additions & 2 deletions eden/mononoke/git/git_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ fbinit = { version = "0.2.0", git = "https://github.com/facebookexperimental/rus
fbinit-tokio = { version = "0.1.2", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
fixtures = { version = "0.1.0", path = "../../tests/fixtures" }
futures-util = "0.3.30"
git2 = "0.20"
indoc = "2.0.2"
maplit = "1.0"
memblob = { version = "0.1.0", path = "../../blobstore/memblob" }
rand_distr = "0.4"
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
repo_identity = { version = "0.1.0", path = "../../repo_attributes/repo_identity" }
tempfile = "3.15"
23 changes: 0 additions & 23 deletions eden/mononoke/git/git_types/src/delta_manifest_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ use mononoke_types::ThriftConvert;
use crate::thrift;
use crate::GitLeaf;
use crate::GitTreeId;
use crate::TreeMember;

/// A manifest that contains an entry for each Git object that was added or modified as part of
/// a commit. The object needs to be different from all objects at the same path in all parents
Expand Down Expand Up @@ -152,28 +151,6 @@ pub struct GDMV2ObjectEntry {
}

impl GDMV2ObjectEntry {
pub fn from_tree_member(member: &TreeMember, inlined_bytes: Option<Bytes>) -> Result<Self> {
let oid = ObjectId::from_hex(member.oid().to_hex().as_bytes()).with_context(|| {
format!(
"Error while converting hash {:?} to ObjectId",
member.oid().to_hex()
)
})?;
let size = member.oid().size();
let kind = match member.kind() {
crate::ObjectKind::Blob => crate::DeltaObjectKind::Blob,
crate::ObjectKind::Tree => crate::DeltaObjectKind::Tree,
kind => anyhow::bail!("Unexpected object kind {:?} for DeltaObjectEntry", kind),
};

Ok(GDMV2ObjectEntry {
oid,
size,
kind,
inlined_bytes,
})
}

pub async fn from_tree_entry(
ctx: &CoreContext,
blobstore: &impl Blobstore,
Expand Down
2 changes: 0 additions & 2 deletions eden/mononoke/git/git_types/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ pub enum MononokeGitError {
ContentMissing(FetchKey),
#[error("Tree Derivation Failed")]
TreeDerivationFailed,
#[error("Invalid Thrift")]
InvalidThrift,
}

#[derive(Clone, Debug, Error)]
Expand Down
111 changes: 0 additions & 111 deletions eden/mononoke/git/git_types/src/handles/blob.rs

This file was deleted.

Loading

0 comments on commit 8398943

Please sign in to comment.