gitai/remote/common/
mod.rs1pub mod fetch;
2pub mod parse;
3pub mod sequence;
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug)]
8pub enum ErrorType {
9 RepositoryRootPathCommand,
10 RepositoryRootPathParse,
11 CurrentDirRetrieve,
12 CurrentDirConvert,
13 DotGitWireFileOpen,
14 DotGitWireFileParse,
15 DotGitWireFileSoundness,
16 DotGitWireFileNameNotUnique,
17 TempDirCreation,
18 GitCloneCommand,
19 GitCloneCommandExitStatus,
20 GitCheckoutCommand,
21 GitCheckoutCommandExitStatus,
22 GitCheckoutChangeDirectory,
23 GitFetchCommand,
24 GitFetchCommandExitStatus,
25 MoveFromTempToDest,
26 NoItemToOperate,
27 CheckDifferenceExecution,
28 CheckDifferenceStringReplace,
29 GitLsRemoteCommand,
30 GitLsRemoteCommandExitStatus,
31 GitLsRemoteCommandStdoutDecode,
32 GitLsRemoteCommandStdoutRegex,
33}
34
35#[derive(Serialize, Deserialize, Debug, Clone)]
64pub enum Method {
65 #[serde(rename = "shallow")]
66 Shallow,
67
68 #[serde(rename = "shallow_no_sparse")]
69 ShallowNoSparse,
70
71 #[serde(rename = "partial")]
72 Partial,
73}
74
75#[derive(Serialize, Deserialize, Debug, Clone)]
76pub struct Parsed {
77 pub name: Option<String>,
78 pub dsc: Option<String>,
79 pub url: String,
80 pub rev: String,
81 pub src: String,
82 pub dst: String,
83 pub mtd: Option<Method>,
84}
85
86pub enum Target {
87 Declared(Option<String>),
88 Direct(Parsed),
89}