File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
25
- tags not shown in commit details popup ([ #193 ] ( https://github.com/extrawurst/gitui/issues/193 ) )
26
26
- min size for relative popups on small terminals ([ #179 ] ( https://github.com/extrawurst/gitui/issues/179 ) )
27
27
- fix crash on resizing terminal to very small width ([ #198 ] ( https://github.com/extrawurst/gitui/issues/198 ) )
28
+ - fix broken tags when using a different internal representation ([ #206 ] ( https://github.com/extrawurst/gitui/issues/206 ) )
28
29
29
30
## [ 0.8.1] - 2020-07-07
30
31
Original file line number Diff line number Diff line change @@ -23,13 +23,24 @@ pub fn get_tags(repo_path: &str) -> Result<Tags> {
23
23
24
24
let repo = repo ( repo_path) ?;
25
25
26
+ //TODO: use tag_foreach once its released
27
+ // see https://github.com/rust-lang/git2-rs/pull/595
26
28
for name in repo. tag_names ( None ) ?. iter ( ) {
27
29
if let Some ( name) = name {
28
- let obj = repo. revparse_single ( name) ?;
30
+ let reference = repo. find_reference (
31
+ format ! ( "refs/tags/{}" , name) . as_str ( ) ,
32
+ ) ?;
33
+ let reference = reference. resolve ( ) ?;
29
34
30
- if let Some ( tag) = obj. as_tag ( ) {
35
+ let commit_id = if let Ok ( tag) = reference. peel_to_tag ( ) {
36
+ Some ( tag. target_id ( ) )
37
+ } else {
38
+ reference. target ( )
39
+ } ;
40
+
41
+ if let Some ( commit_id) = commit_id {
31
42
let tag_name = String :: from ( name) ;
32
- adder ( CommitId :: new ( tag . target_id ( ) ) , tag_name) ;
43
+ adder ( CommitId :: new ( commit_id ) , tag_name) ;
33
44
}
34
45
}
35
46
}
You can’t perform that action at this time.
0 commit comments