pub struct GitCreateTreeRequest {
pub tree: Vec<GitCreateTreeRequestTreeInner>,
pub base_tree: Option<String>,
}
Fields§
§tree: Vec<GitCreateTreeRequestTreeInner>
Objects (of path
, mode
, type
, and sha
) specifying a tree structure.
base_tree: Option<String>
The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by base_tree
and entries defined in the tree
parameter. Entries defined in the tree
parameter will overwrite items from base_tree
with the same path
. If you’re creating new changes on a branch, then normally you’d set base_tree
to the SHA1 of the Git tree object of the current latest commit on the branch you’re working on. If not provided, GitHub will create a new Git tree object from only the entries defined in the tree
parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit’s tree and were not defined in the tree
parameter will be listed as deleted by the new commit.
Implementations§
Source§impl GitCreateTreeRequest
impl GitCreateTreeRequest
pub fn new(tree: Vec<GitCreateTreeRequestTreeInner>) -> GitCreateTreeRequest
Trait Implementations§
Source§impl Clone for GitCreateTreeRequest
impl Clone for GitCreateTreeRequest
Source§fn clone(&self) -> GitCreateTreeRequest
fn clone(&self) -> GitCreateTreeRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more