File tree 2 files changed +26
-2
lines changed
gitoxide-core/src/repository
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,18 @@ pub(crate) mod function {
102
102
if mapping. spec_index != last_spec_index {
103
103
last_spec_index = mapping. spec_index ;
104
104
spec. to_ref ( ) . write_to ( & mut out) ?;
105
+ let is_implicit = mapping. spec_index . implicit_index ( ) . is_some ( ) ;
106
+ if is_implicit {
107
+ write ! ( & mut out, " (implicit" ) ?;
108
+ if spec. to_ref ( )
109
+ == git:: remote:: fetch:: Tags :: Included
110
+ . to_refspec ( )
111
+ . expect ( "always yields refspec" )
112
+ {
113
+ write ! ( & mut out, ", due to auto-tag" ) ?;
114
+ }
115
+ write ! ( & mut out, ")" ) ?;
116
+ }
105
117
writeln ! ( out) ?;
106
118
}
107
119
@@ -118,7 +130,7 @@ pub(crate) mod function {
118
130
Some ( edit) => {
119
131
writeln ! ( out, " -> {} [{}]" , edit. name, update. mode)
120
132
}
121
- None => writeln ! ( out, " (fetch only)" ) ,
133
+ None => writeln ! ( out, " [{}]" , update . mode ) ,
122
134
} ?;
123
135
}
124
136
if !map. fixes . is_empty ( ) {
Original file line number Diff line number Diff line change @@ -126,6 +126,18 @@ mod refs_impl {
126
126
. get ( refspecs, & map. extra_refspecs )
127
127
. expect ( "refspecs here are the ones used for mapping" ) ;
128
128
spec. to_ref ( ) . write_to ( & mut out) ?;
129
+ let is_implicit = mapping. spec_index . implicit_index ( ) . is_some ( ) ;
130
+ if is_implicit {
131
+ write ! ( & mut out, " (implicit" ) ?;
132
+ if spec. to_ref ( )
133
+ == git:: remote:: fetch:: Tags :: Included
134
+ . to_refspec ( )
135
+ . expect ( "always yields refspec" )
136
+ {
137
+ write ! ( & mut out, ", due to auto-tag" ) ?;
138
+ }
139
+ write ! ( & mut out, ")" ) ?;
140
+ }
129
141
writeln ! ( out) ?;
130
142
}
131
143
@@ -203,7 +215,7 @@ mod refs_impl {
203
215
}
204
216
}
205
217
if refspecs. is_empty ( ) {
206
- bail ! ( "Without ref-specs there is nothing to show here. Add ref-specs as arguments or configure them in git-config." )
218
+ bail ! ( "Without refspecs there is nothing to show here. Add refspecs as arguments or configure them in git-config." )
207
219
}
208
220
Ok ( ( ) )
209
221
}
You can’t perform that action at this time.
0 commit comments