-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: ## This stack Implementing support for the `GitSubmoduleAction::EXPAND`. For more details, see T174902563 or [this doc](https://docs.google.com/document/d/15p_goy8-aTQ0PjL5Jg3ZcY-9cYKuf77nnguZenRE97I/edit#heading=h.1c6rrucwd0sy). ## This diff The expansion of submodules requires us to generate the proper delta to update the submodule copy inside the source repo. To do this, we call the `bonsai_diff` function, which, given a manifest id and its parent ids, generates the FileChanges to bring the working copy to that state. **Problem** `bonsai_diff` requires that the manifest being used to call it has a leaf of type `(FileType, FileId)`, where `FileId` is a generic type that is returned in the results. This diff generlizes that requirement by introducing a trait, `ManifestLeafId`, that can be implemented by any manifest id that we want to use with `bonsai_diff`. In the next few diffs we'll use it with `FsnodeId`, which is why I'm already adding an implementation for it. Differential Revision: D53316968 fbshipit-source-id: 1d60eb9f400caa8c137a083670a76c037dc64a3c
- Loading branch information
1 parent
8f260b3
commit e4542a1
Showing
1 changed file
with
53 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters