Skip to content

Commit 427cf16

Browse files
rappazzopaulusmack
authored andcommitted
gitk: Add mouse right-click options to copy path and branch name
This adds menu entries to two of the right-click menus: - 'Copy path' in the file list - 'Copy branch name' on a branch in the commit list Signed-off-by: Michael Rappazzo <rappazzo@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent ef87a48 commit 427cf16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gitk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,6 +2645,7 @@ proc makewindow {} {
26452645
makemenu $headctxmenu {
26462646
{mc "Check out this branch" command cobranch}
26472647
{mc "Remove this branch" command rmbranch}
2648+
{mc "Copy branch name" command {clipboard clear; clipboard append $headmenuhead}}
26482649
}
26492650
$headctxmenu configure -tearoff 0
26502651

@@ -2655,6 +2656,7 @@ proc makewindow {} {
26552656
{mc "Highlight this only" command {flist_hl 1}}
26562657
{mc "External diff" command {external_diff}}
26572658
{mc "Blame parent commit" command {external_blame 1}}
2659+
{mc "Copy path" command {clipboard clear; clipboard append $flist_menu_file}}
26582660
}
26592661
$flist_menu configure -tearoff 0
26602662

0 commit comments

Comments
 (0)