Skip to content

Commit

Permalink
Also use lightweight tags in the Refs line of the diff view
Browse files Browse the repository at this point in the history
Closes #1235
  • Loading branch information
koutcher committed Oct 29, 2023
1 parent 411d37f commit 8ec2597
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ diff_read(struct view *view, struct buffer *buf, bool force_stop)
diff_restore_line(view, state);

if (!state->adding_describe_ref && !ref_list_contains_tag(view->vid)) {
const char *describe_argv[] = { "git", "describe", view->vid, NULL };
const char *describe_argv[] = { "git", "describe", "--tags", view->vid, NULL };
enum status_code code = begin_update(view, NULL, describe_argv, OPEN_EXTRA);

if (code != SUCCESS) {
Expand Down
2 changes: 1 addition & 1 deletion test/main/mailmap-test
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ EOF

assert_equals 'mailmapped-diff.screen' <<EOF
commit 5cb3412a5e06e506840495b91acc885037a48b72
Refs: [master], {origin/master}, {origin/HEAD}
Refs: [master], {origin/master}, {origin/HEAD}, v1.0-13-g5cb3412
Author: Full Throttle <[email protected]>
AuthorDate: Wed Apr 7 05:37:40 2010 +0000
Commit: ¯\_(ツ)_/¯ <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions test/main/view-split-test
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ EOF

assert_equals 'main-vsplit-25-75.screen' <<EOF
2010-04-07 05:37 +0 |commit 5cb3412a5e06e506840495b91acc885037a48b72
2010-03-29 17:15 +0 |Refs: [master], {origin/master}, {origin/HEAD}
2010-03-29 17:15 +0 |Refs: [master], {origin/master}, {origin/HEAD}, v1.0-13-g5c
2010-03-21 04:53 +0 |Author: Max Power <[email protected]>
2010-03-12 16:31 +0 |AuthorDate: Wed Apr 7 05:37:40 2010 +0000
2010-03-04 04:09 +0 |Commit: Committer <[email protected]>
Expand All @@ -76,7 +76,7 @@ assert_equals 'main-hsplit-default.screen' <<EOF
2010-03-04 04:09 +0000 A. U. Thor o Commit 10 A
[main] 5cb3412a5e06e506840495b91acc885037a48b72 - commit 1 of 50 10%
commit 5cb3412a5e06e506840495b91acc885037a48b72
Refs: [master], {origin/master}, {origin/HEAD}
Refs: [master], {origin/master}, {origin/HEAD}, v1.0-13-g5cb3412
Author: Max Power <[email protected]>
AuthorDate: Wed Apr 7 05:37:40 2010 +0000
Commit: Committer <[email protected]>
Expand All @@ -99,7 +99,7 @@ assert_equals 'main-hsplit-50-50.screen' <<EOF
2010-02-06 15:02 +0000 作者 o Commit 9 C
[main] 5cb3412a5e06e506840495b91acc885037a48b72 - commit 1 of 50 16%
commit 5cb3412a5e06e506840495b91acc885037a48b72
Refs: [master], {origin/master}, {origin/HEAD}
Refs: [master], {origin/master}, {origin/HEAD}, v1.0-13-g5cb3412
Author: Max Power <[email protected]>
AuthorDate: Wed Apr 7 05:37:40 2010 +0000
Commit: Committer <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion test/regressions/github-434-test
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test_tig

assert_equals 'vsplit-auto.screen' <<EOF
2010-04-07 05:37 +0000 Max Power o [master] {origin/master} {origin/|commit 5cb3412a5e06e506840495b91acc885037a48b72
2010-03-29 17:15 +0000 Jørgen Thygesen Brahe o Commit 10 D |Refs: [master], {origin/master}, {origin/HEAD}
2010-03-29 17:15 +0000 Jørgen Thygesen Brahe o Commit 10 D |Refs: [master], {origin/master}, {origin/HEAD}, v1.0-13-g5cb3412
2010-03-21 04:53 +0000 作者 o Commit 10 C |Author: Max Power <[email protected]>
2010-03-12 16:31 +0000 René Lévesque o Commit 10 B |AuthorDate: Wed Apr 7 05:37:40 2010 +0000
2010-03-04 04:09 +0000 A. U. Thor o Commit 10 A |Commit: Committer <[email protected]>
Expand Down

0 comments on commit 8ec2597

Please sign in to comment.