"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
tog: ref view must pass selected reference name to log view
To:
gameoftrees@openbsd.org
Date:
Fri, 4 Dec 2020 15:51:38 +0100

Download raw body.

Thread
I think naddy may have already found and reported this bug. But I cannot
find the corresponding discussion thread to respond to.

This patch is about hitting Enter on a reference displayed in a ref
view, which will open a log view for the corresponding branch/tag.

The log view needs to told the name of the selected reference. Otherwise,
keys such as Ctrl-L and B will load the branch pointed to by HEAD instead
of staying in the selected branch/tag.

diff b0bbc269f3c2ec4ef62cf31c6f1ffc148376422f fd81e921f8f28d9d794f5cda77e6bc1ad78cf472
blob - e135c878d3f60bf9ce1cf1341dbe44dd7cb1a74f
blob + 189ec74c134d6673f79d5e080dfb76f6a2975f4b
--- tog/tog.c
+++ tog/tog.c
@@ -5754,7 +5754,8 @@ log_ref_entry(struct tog_view **new_view, int begin_x,
 		goto done;
 	}
 
-	err = open_log_view(log_view, commit_id, repo, NULL, "", 0);
+	err = open_log_view(log_view, commit_id, repo,
+	    got_ref_get_name(re->ref), "", 0);
 done:
 	if (err)
 		view_close(log_view);