From 8ec25974294b1d26033aacd9b2f32ca8b03f28f3 Mon Sep 17 00:00:00 2001 From: Thomas Koutcher Date: Sat, 17 Sep 2022 12:05:25 +0200 Subject: [PATCH] Also use lightweight tags in the Refs line of the diff view Closes #1235 --- src/diff.c | 2 +- test/main/mailmap-test | 2 +- test/main/view-split-test | 6 +++--- test/regressions/github-434-test | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/diff.c b/src/diff.c index 2071c38ee..9ba721d46 100644 --- a/src/diff.c +++ b/src/diff.c @@ -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) { diff --git a/test/main/mailmap-test b/test/main/mailmap-test index 9eb96b479..bb78747fd 100755 --- a/test/main/mailmap-test +++ b/test/main/mailmap-test @@ -50,7 +50,7 @@ EOF assert_equals 'mailmapped-diff.screen' < AuthorDate: Wed Apr 7 05:37:40 2010 +0000 Commit: ¯\_(ツ)_/¯ diff --git a/test/main/view-split-test b/test/main/view-split-test index 813d4d05e..3c1c13fc6 100755 --- a/test/main/view-split-test +++ b/test/main/view-split-test @@ -50,7 +50,7 @@ EOF assert_equals 'main-vsplit-25-75.screen' < 2010-03-12 16:31 +0 |AuthorDate: Wed Apr 7 05:37:40 2010 +0000 2010-03-04 04:09 +0 |Commit: Committer @@ -76,7 +76,7 @@ assert_equals 'main-hsplit-default.screen' < AuthorDate: Wed Apr 7 05:37:40 2010 +0000 Commit: Committer @@ -99,7 +99,7 @@ assert_equals 'main-hsplit-50-50.screen' < AuthorDate: Wed Apr 7 05:37:40 2010 +0000 Commit: Committer diff --git a/test/regressions/github-434-test b/test/regressions/github-434-test index 278e23df0..4e72e90b7 100755 --- a/test/regressions/github-434-test +++ b/test/regressions/github-434-test @@ -28,7 +28,7 @@ test_tig assert_equals 'vsplit-auto.screen' < 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