git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk: replace SHA1 entry field on keyboard paste

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 4, 2014, 18:15 UTC
Message-ID
<xmqqmwh5ltjo.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1393570297-6012-1-git-send-email-ilya.bobyr@gmail.com>
From: Ilya Bobyr <ilya.bobyr@gmail.com>
Date: Thu, 27 Feb 2014 22:51:37 -0800

We already replace old SHA with the clipboard content for the mouse paste event. It seems reasonable to do the same when pasting from keyboard.

Signed-off-by: Ilya Bobyr <ilya.bobyr@gmail.com>
---
 * Paul?  I do not use <<Paste>> on my keyboard, so I am not in the
   position to say that this patch is correct (or not).  I am just
   forwarding it in case you think gitk users will find it useful.
   The original patch was done against my tree, so I hand tweaked it
   to apply to your tree.
   
   Thanks.
 gitk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitk b/gitk
index 90764e8..2f58bcf 100755
--- a/gitk
+++ b/gitk
@@ -2585,6 +2585,7 @@ proc makewindow {} {
     bind $fstring <Key-Return> {dofind 1 1}
     bind $sha1entry <Key-Return> {gotocommit; break}
     bind $sha1entry <<PasteSelection>> clearsha1
+    bind $sha1entry <<Paste>> clearsha1
     bind $cflist <1> {sel_flist %W %x %y; break}
     bind $cflist <B1-Motion> {sel_flist %W %x %y; break}
     bind $cflist <ButtonRelease-1> {treeclick %W %x %y}
Previous: Ilya BobyrNext: Ilya Bobyr
Message 2 of 4 in “gitk: replace SHA1 entry field on keyboard paste”
  1. gitk: replace SHA1 entry field on keyboard pasteIlya Bobyr, Feb 28, 2014
  2. gitk: replace SHA1 entry field on keyboard pasteJunio C Hamano, Mar 4, 2014
  3. Ilya BobyrMar 5, 2014
  4. Paul MackerrasJun 15, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.