@@ -26,7 +26,8 @@ pub enum Instruction<'a> {
26
26
Fetch ( Fetch < ' a > ) ,
27
27
}
28
28
29
- /// Note that all sources can either be a ref-name, partial or full, or a rev-spec. Destinations can only be a partial or full ref name.
29
+ /// Note that all sources can either be a ref-name, partial or full, or a rev-spec, unless specified otherwise, on the local side.
30
+ /// Destinations can only be a partial or full ref names on the remote side.
30
31
#[ derive( PartialEq , Eq , Copy , Clone , Hash , Debug ) ]
31
32
pub enum Push < ' a > {
32
33
/// Push all local branches to the matching destination on the remote, which has to exist to be updated.
@@ -40,67 +41,40 @@ pub enum Push<'a> {
40
41
ref_or_pattern : & ' a BStr ,
41
42
} ,
42
43
/// Exclude a single ref.
43
- ExcludeSingle {
44
- /// A single full ref name to exclude.
45
- src : & ' a BStr ,
46
- } ,
47
- /// Exclude multiple refs with single `*` glob.
48
- ExcludeMultipleWithGlob {
49
- /// A ref pattern with a single `*`.
44
+ Exclude {
45
+ /// A full or partial ref name to exclude, or multiple if a single `*` is used.
50
46
src : & ' a BStr ,
51
47
} ,
52
48
/// Push a single ref or refspec to a known destination ref.
53
- Single {
54
- /// The source ref or refspec to push.
55
- src : & ' a BStr ,
56
- /// The ref to update with the object from `src`.
57
- dst : & ' a BStr ,
58
- /// If true, allow non-fast-forward updates of `dest`.
59
- allow_non_fast_forward : bool ,
60
- } ,
61
- /// Push a multiple refs to matching destination refs, with exactly a single glob on both sides.
62
- MultipleWithGlob {
63
- /// The source ref to match against all refs for pushing, as pattern with a single `*`.
49
+ Matching {
50
+ /// The source ref or refspec to push. If pattern, it contains a single `*`.
64
51
src : & ' a BStr ,
65
- /// The ref to update with object obtained from `src`, filling in the `*` with the portion that matched in `src` .
52
+ /// The ref to update with the object from `src`. If `src` is a pattern, this is a pattern too .
66
53
dst : & ' a BStr ,
67
54
/// If true, allow non-fast-forward updates of `dest`.
68
55
allow_non_fast_forward : bool ,
69
56
} ,
70
57
}
71
58
72
- /// Note that any source can either be a ref name (full or partial) or a fully spelled out hex-sha for an object.
59
+ /// Note that any source can either be a ref name (full or partial) or a fully spelled out hex-sha for an object, on the remote side .
73
60
///
74
- /// Destinations can only be a partial or full ref-name .
61
+ /// Destinations can only be a partial or full ref-names on the local side .
75
62
#[ derive( PartialEq , Eq , Copy , Clone , Hash , Debug ) ]
76
63
pub enum Fetch < ' a > {
77
64
Only {
78
65
/// The ref name to fetch on the remote side, without updating the local side. This will write the result into `FETCH_HEAD`.
79
66
src : & ' a BStr ,
80
67
} ,
81
68
/// Exclude a single ref.
82
- ExcludeSingle {
83
- /// A single full ref name to exclude.
69
+ Exclude {
70
+ /// A single partial or full ref name to exclude on the remote, or a pattern with a single `*` .
84
71
src : & ' a BStr ,
85
72
} ,
86
- /// Exclude multiple refs with single `*` glob.
87
- ExcludeMultipleWithGlob {
88
- /// A ref pattern with a single `*`.
89
- src : & ' a BStr ,
90
- } ,
91
- AndUpdateSingle {
92
- /// The ref name to fetch on the remote side.
93
- src : & ' a BStr ,
94
- /// The local destination to update with what was fetched.
95
- dst : & ' a BStr ,
96
- /// If true, allow non-fast-forward updates of `dest`.
97
- allow_non_fast_forward : bool ,
98
- } ,
99
- /// Similar to `FetchAndUpdate`, but src and destination contain a single glob to fetch and update multiple refs.
100
- AndUpdateMultipleWithGlob {
101
- /// The ref glob to match against all refs on the remote side for fetching, as pattern with a single `*`.
73
+ AndUpdate {
74
+ /// The ref name to fetch on the remote side, or a pattern with a single `*` to match against.
102
75
src : & ' a BStr ,
103
- /// The local destination to update with what was fetched by replacing the single `*` with the matching portion from `src`.
76
+ /// The local destination to update with what was fetched, or a pattern whose single `*` will be replaced with the matching portion
77
+ /// of the `*` from `src`.
104
78
dst : & ' a BStr ,
105
79
/// If true, allow non-fast-forward updates of `dest`.
106
80
allow_non_fast_forward : bool ,
0 commit comments