-
Notifications
You must be signed in to change notification settings - Fork 140
[guitool] feature to specify keyboard shortcuts for custom tools #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: git-gui/master
Are you sure you want to change the base?
Conversation
Welcome to GitGitGadgetHi @harish2704, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests. Please make sure that this Pull Request has a good description, as it will be used as cover letter. Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:
It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code. Contributing the patchesBefore you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a PR comment of the form Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions. If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox ("raw") file corresponding to the mail you want to reply to from the Git mailing list. If you use GMail, you can upload that raw mbox file via: curl -g --user "<EMailAddress>:<Password>" --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt |
@harish2704 I allowed myself to edit the PR description that did not show up well (and that would have rendered totally crappily in the cover letter) and that still included the warning that you should not open a PR at https://github.com/git/git. Hope you don't mind! |
/allow |
User harish2704 is now allowed to use GitGitGadget. |
lib/tools.tcl
Outdated
@@ -61,9 +61,18 @@ proc tools_populate_one {fullname} { | |||
} | |||
} | |||
|
|||
tools_create_item $parent command \ | |||
if {[info exists repo_config(guitool.$fullname.gitgui-shortcut)]} { | |||
set gitgui_shortcut $repo_config(guitool.$fullname.gitgui-shortcut) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the variable really have to have the prefix gitgui_
? This is Git GUI's source code after all, so it is kinda redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That make sense.
So, What should I do now? Can I simply edit it in a new commit ? ( it know that it will work for PR based work flow, but I don't how it will work for mailing list based work flow )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Git (and as a consequence, Git GUI), introducing a bug in one patch, only to fix it immediately in a following patch, is highly frowned upon.
Therefore I would strongly suggest to amend and force-push.
42565be
to
91d864a
Compare
BTW as this is a continuation of git#220, how about closing that PR? |
@@ -61,9 +61,18 @@ proc tools_populate_one {fullname} { | |||
} | |||
} | |||
|
|||
tools_create_item $parent command \ | |||
if {[info exists repo_config(guitool.$fullname.gitgui-shortcut)]} { | |||
set accel_key $repo_config(guitool.$fullname.gitgui-shortcut) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dscho : I fixed the variable naming you suggested.
@dscho : Done git#220 (comment) |
/allow prati0100 |
User prati0100 is now allowed to use GitGitGadget. |
@prati0100 there you go. |
Thanks @dscho |
This feature will add following introduce following optional configuration key into gitconfig guitool.<name>.gitgui-shortcut Specifies a keyboard shortcut for the custom tool in the git-gui application. The value must be a valid string ( without "<" , ">" wrapper ) understood by the TCL/TK 's bind command.See https://www.tcl.tk/man/tcl8.4/TkCmd/bind.htm for more details about the supported values. Avoid creating shortcuts that conflict with existing built-in `git gui` shortcuts. Example: [guitool "Terminal"] cmd = gnome-terminal -e zsh noconsole = yes gitgui-shortcut = "Control-y" [guitool "Sync"] cmd = "git pull; git push" gitgui-shortcut = "Alt-s" Signed-off-by: Harish.K <[email protected]>
91d864a
to
cb81cae
Compare
This feature will add following introduce following optional
configuration key into gitconfig
Example: