summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-09-24Merge branches 'js/msgfmt-on-windows', 'tz/fsf-address-update', ↵Libravatar Pratyush Yadav6-15/+72
'jn/reproducible-build', 'ls/no-double-utf8-author-name', 'js/misc-git-gui-stuff', 'bb/ssh-key-files', 'bp/bind-kp-enter', 'cb/ttk-style' and 'py/call-do-quit-before-exit' of ../git into py/git-git-extra-stuff
2019-09-14Merge branch 'bp/amend-toggle-bind'Libravatar Pratyush Yadav1-0/+9
Toggle amend on and off with the keyboard shortcut "Ctrl+e". * bp/amend-toggle-bind: git-gui: add hotkey to toggle "Amend Last Commit"
2019-09-14git-gui: add hotkey to toggle "Amend Last Commit"Libravatar Birger Skogeng Pedersen1-0/+9
Selecting whether to "Amend Last Commit" or not does not have a hotkey. With this patch, the user may toggle between the two options with CTRL/CMD+e. Signed-off-by: Birger Skogeng Pedersen <birger.sp@gmail.com> Rebased-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-09-14Merge branch 'bw/commit-scrollbuffer'Libravatar Pratyush Yadav1-0/+6
Add a scrollbar at the bottom of the commit message buffer. * bw/commit-scrollbuffer: git-gui: add horizontal scrollbar to commit buffer
2019-09-14Merge branch 'bw/amend-checkbutton'Libravatar Pratyush Yadav4-36/+18
Change the amend setting from two radio buttons ("New commit" and "Amend commit") to a single checkbutton. The two radio buttons can never be selected together because they are exactly the opposite of each other, so it makes sense to change it to a single checkbutton. * bw/amend-checkbutton: git-gui: convert new/amend commit radiobutton to checkbutton
2019-09-14git-gui: add horizontal scrollbar to commit bufferLibravatar Bert Wesarg1-0/+6
While the commit message widget has a configurable fixed width, it nevertheless allowed to write commit messages which exceeded this limit. Though there is no visual clue, that there is scrolling going on. Now there is a horizontal scrollbar. There seems to be a bug in at least Tcl/Tk up to version 8.6.8, which does not update the horizontal scrollbar if one removes the whole content at once. Suggested-by: Birger Skogeng Pedersen <birger.sp@gmail.com> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-09-14git-gui: convert new/amend commit radiobutton to checkbuttonLibravatar Bert Wesarg4-36/+18
Its a bi-state anyway and also saves one line in the menu. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-09-12Merge branch 'py/revert-hunks-lines'Libravatar Pratyush Yadav2-18/+135
git-gui learned to revert selected lines and hunks, just like it can stage selected lines and hunks. To provide a safety net for accidental revert, the most recent revert can be undone. * py/revert-hunks-lines: git-gui: allow undoing last revert git-gui: return early when patch fails to apply git-gui: allow reverting selected hunk git-gui: allow reverting selected lines
2019-09-12Merge branch 'bp/widget-focus-hotkeys'Libravatar Pratyush Yadav1-1/+31
git-gui learned to switch focus between widgets "unstaged commits", "staged commits", "diff", and "commit message" using the keyboard shortcuts Alt+1, Alt+2, Alt+3, and Alt+4 respectively. * bp/widget-focus-hotkeys: git-gui: add hotkeys to set widget focus
2019-09-11git-gui: add hotkeys to set widget focusLibravatar Birger Skogeng Pedersen1-1/+31
The user cannot change focus between the list of files, the diff view and the commit message widgets without using the mouse (clicking either of the four widgets). With this patch, the user may set ui focus to the previously selected path in either the "Unstaged Changes" or "Staged Changes" widgets, using ALT+1 or ALT+2. The user may also set the ui focus to the diff view widget with ALT+3, or to the commit message widget with ALT+4. This enables the user to select/unselect files, view the diff and create a commit in git-gui using keyboard-only. Signed-off-by: Birger Skogeng Pedersen <birger.sp@gmail.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-08-29git-gui: allow undoing last revertLibravatar Pratyush Yadav2-5/+66
Accidental clicks on the revert hunk/lines buttons can cause loss of work, and can be frustrating. So, allow undoing the last revert. Right now, a stack or deque are not being used for the sake of simplicity, so only one undo is possible. Any reverts before the previous one are lost. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-08-26git-gui: return early when patch fails to applyLibravatar Pratyush Yadav1-0/+2
In the procedure apply_or_revert_range_or_line, if the patch does not apply successfully, a dialog is shown, but execution proceeds after that. Instead, return early on error so the parts that come after this don't work on top of an error state. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-08-26git-gui: allow reverting selected hunkLibravatar Pratyush Yadav2-6/+29
Just like the user can select a hunk to stage or unstage, add the ability to revert hunks. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-08-26git-gui: allow reverting selected linesLibravatar Pratyush Yadav2-7/+38
Just like the user can select lines to stage or unstage, add the ability to revert selected lines. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2019-08-07git-gui: call do_quit before destroying the main windowLibravatar Pratyush Yadav1-2/+17
If the toplevel window for the window being destroyed is the main window (aka "."), then simply destroying it means the cleanup tasks are not executed (like saving the commit message buffer, saving window state, etc.) All this is handled by do_quit. Call it instead of directly destroying the main window. For other toplevel windows, the old behavior remains. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-05git-gui: workaround ttk:style theme useLibravatar Clemens Buchacher1-5/+10
Tk 8.5.7, which is the latest version on Centos 6, does not support getting the current theme with [ttk::style theme use]. Use the existing workaround for this in all places. Signed-off-by: Clemens Buchacher <drizzd@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-02git-gui: bind CTRL/CMD+numpad ENTER to do_commitLibravatar Birger Skogeng Pedersen1-0/+1
CTRL/CMD+ENTER is bound to do_commit, but this did not apply for the (numpad ENTER) key. To enable CTRL/CMD+ENTER and CTRL/CMD+(numpad ENTER) to yield the same behaviour, CTRL/CMD+(numpad enter) has also been bound to do_commit. Signed-off-by: Birger Skogeng Pedersen <birgersp@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-02git-gui: search for all current SSH key typesLibravatar Beat Bolli1-1/+4
OpenSSH has supported Ed25519 keys since version 6.4 (2014-01-30), and ECDSA keys since version 5.7 (2011-01-24). git-gui fails to find these key types in its Help/Show SSH Key dialog. Teach git-gui to show Ed25519 and ECDSA keys as well. This was originally reported in https://github.com/git-for-windows/git/issues/1487 and subseqently in https://public-inbox.org/git/F65780F29E48994380E2BCE87C6F071101146AB1@DEERLM99EX2MSX.ww931.my-it-solutions.net/ Signed-off-by: Beat Bolli <dev+git@drbeat.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09git-gui: allow Ctrl+T to toggle multiple pathsLibravatar Johannes Schindelin1-0/+13
It is possible to select multiple files in the "Unstaged Changes" and the "Staged Changes" lists. But when hitting Ctrl+T, surprisingly only one entry is handled, not all selected ones. Let's just use the same code path as for the "Stage To Commit" and the "Unstage From Commit" menu items. This fixes https://github.com/git-for-windows/git/issues/1012 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09git-gui: fix exception when trying to stage with empty file listLibravatar Johannes Schindelin1-2/+10
If there is nothing to stage, there is nothing to stage. Let's not try to, even if the file list contains nothing at all. This fixes https://github.com/git-for-windows/git/issues/1075 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09git-gui: avoid exception upon Ctrl+T in an empty listLibravatar Johannes Schindelin1-0/+4
Previously unstaged files can be staged by clicking on them and then pressing Ctrl+T. Conveniently, the next unstaged file is selected automatically so that the unstaged files can be staged by repeatedly pressing Ctrl+T. When a user hits Ctrl+T one time too many, though, Git GUI used to throw this exception: expected number but got "" expected number but got "" while executing "expr {int([lindex [$w tag ranges in_diff] 0])}" (procedure "toggle_or_diff" line 13) invoked from within "toggle_or_diff toggle .vpane.files.workdir.list " (command bound to event) Let's just avoid that by skipping the operation when there are no more files to stage. This fixes https://github.com/git-for-windows/git/issues/1060 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09git gui: fix staging a second line to a 1-line fileLibravatar Johannes Schindelin1-0/+1
When a 1-line file is augmented by a second line, and the user tries to stage that single line via the "Stage Line" context menu item, we do not want to see "apply: corrupt patch at line 5". The reason for this error was that the hunk header looks like this: @@ -1 +1,2 @@ but the existing code expects the original range always to contain a comma. This problem is easily fixed by cutting the string "1 +1,2" (that Git GUI formerly mistook for the starting line) at the space. This fixes https://github.com/git-for-windows/git/issues/515 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-05git-gui: prevent double UTF-8 conversionLibravatar Łukasz Stelmach1-3/+9
Convert author's name and e-mail address from the UTF-8 (or any other) encoding in load_last_commit function the same way commit message is converted. Amending commits in git-gui without such conversion breaks UTF-8 strings. For example, "\305\201ukasz" (as written by git cat-file) becomes "\303\205\302\201ukasz" in an amended commit. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-22git-gui: sort entries in optimized tclIndexLibravatar Anders Kaseorg1-1/+1
auto_mkindex expands wildcards in directory order, which depends on the underlying filesystem. To improve build reproducibility, sort the list of *.tcl files in the Makefile. The unoptimized loading case was previously fixed in gitgui-0.21.0~14 (git-gui: sort entries in tclIndex, 2015-01-26). Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-09Replace Free Software Foundation address in license noticesLibravatar Todd Zullinger1-2/+1
The mailing address for the FSF has changed over the years. Rather than updating the address across all files, refer readers to gnu.org, as the GNU GPL documentation now suggests for license notices. The mailing address is retained in the full license files (COPYING and LGPL-2.1). Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-25git-gui (MinGW): make use of MSys2's msgfmtLibravatar Johannes Schindelin1-0/+2
When Git for Windows was still based on MSys1, we had no gettext, ergo no msgfmt, either. Therefore, we introduced a small and simple Tcl script to perform the same task. However, with MSys2, we no longer need that because we have a proper msgfmt executable. Plus, the po2msg.sh script somehow manages to hang when run in parallel in Git for Windows' SDK (symptom: the Continuous Testing tasks timing out). Two reasons to use real msgfmt.exe instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-18Merge remote-tracking branch 'philoakley/dup-gui'Libravatar Pat Thoyts1-7/+10
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2017-01-20git gui: allow for a long recentrepo listLibravatar Philip Oakley1-1/+5
The gui.recentrepo list may be longer than the maxrecent setting. Allow extra space to show any extra entries. In an ideal world, the git gui would limit the number of entries to the maxrecent setting, however the recentrepo config list may have been extended outwith the gui, or the maxrecent setting changed to a reduced value. Further, when testing the gui's recentrepo logic it is useful to show these extra, but valid, entries. Signed-off-by: Philip Oakley <philipoakley@iee.org>
2017-01-20git gui: de-dup selected repo from recentrepo historyLibravatar Philip Oakley1-4/+3
When the gui/user selects a repo for display, that repo is brought to the end of the recentrepo config list. The logic can fail if there are duplicate old entries for the repo (you cannot unset a single config entry when duplicates are present). Similarly, the maxrecentrepo logic could fail if older duplicate entries are present. The first commit of this series ({this}~2) fixed the config unsetting issue. Rather than manipulating a local copy of the $recent list (one cannot know how many entries were removed), simply re-read it. We must also catch the error when the attempt to remove the second copy from the re-read list is performed. Signed-off-by: Philip Oakley <philipoakley@iee.org>
2017-01-20git gui: cope with duplicates in _get_recentrepoLibravatar Philip Oakley1-2/+2
_get_recentrepo will fail if duplicate invalid entries are present in the recentrepo config list. The previous commit fixed the 'git config' limitations in _unset_recentrepo by unsetting all config entries, however this code would fail on the second attempt to unset it. Refactor the code to pre-sort and de-duplicate the recentrepo list to avoid a potential second unset attempt. Signed-off-by: Philip Oakley <philipoakley@iee.org>
2017-01-20git-gui: remove duplicate entries from .gitconfig's gui.recentrepoLibravatar Philip Oakley1-1/+1
The git gui's recent repo list may become contaminated with duplicate entries. The git gui would barf when attempting to remove one entry. Remove them all - there is no option within 'git config' to selectively remove one of the entries. This issue was reported on the 'Git User' list (https://groups.google.com/forum/#!topic/git-users/msev4KsQGFc, Warning: gui.recentrepo has multiply values while executing). And also by zosrothko as a Git-for-Windows issue https://github.com/git-for-windows/git/issues/1014. On startup the gui checks that entries in the recentrepo list are still valid repos and deletes thoses that are not. If duplicate entries are present the 'git config --unset' will barf and this prevents the gui from starting. Subsequent patches fix other parts of recentrepo logic used for syncing internal lists with the external .gitconfig. Reported-by: Alexey Astakhov <asstv7@gmail.com> Signed-off-by: Philip Oakley <philipoakley@iee.org>
2016-10-20git-gui: set version 0.21Libravatar Pat Thoyts1-1/+1
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-20Merge branch 'as/bulgarian' into puLibravatar Pat Thoyts2-1374/+1467
2016-10-20git-gui: Mark 'All' in remote.tcl for translationLibravatar Alexander Shopov1-4/+4
Signed-off-by: Alexander Shopov <ash@kambanaria.org> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-20git-gui i18n: Updated Bulgarian translation (565,0f,0u)Libravatar Alexander Shopov1-1370/+1463
Signed-off-by: Alexander Shopov <ash@kambanaria.org> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-20Merge branch 'os/preserve-author' into puLibravatar Pat Thoyts1-3/+33
2016-10-20Merge branch 'kb/unicode' into puLibravatar Pat Thoyts3-30/+12
2016-10-06git-gui: avoid persisting modified author identityLibravatar Pat Thoyts1-20/+31
Commit 7e71adc77f fixes a problem with git-gui failing to pick up the original author identity during a commit --amend operation. However, the new author details then become persistent for the remainder of the session. This commit fixes this by ensuring the environment variables are reset and the author information reset once the commit is completed. The relevant changes were reworked to reduce global variables. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-06git-gui: handle the encoding of Git's output correctlyLibravatar Karsten Blees1-25/+4
If we use 'eval exec $opt $cmdp $args' to execute git command, tcl engine will convert the output of the git comand with the rule system default code page to unicode. But cp936 -> unicode conversion implicitly done by exec is not reversible. So we have to use git_read instead. Bug report and an original reproducer by Cloud Chou: https://github.com/msysgit/git/issues/302 Cloud Chou find the reason of the bug. Thanks-to: Johannes Schindelin <johannes.schindelin@gmx.de> Thanks-to: Pat Thoyts <patthoyts@users.sourceforge.net> Reported-by: Cloud Chou <515312382@qq.com> Original-test-by: Cloud Chou <515312382@qq.com> Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Cloud Chou <515312382@qq.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-06git-gui: unicode file name support on windowsLibravatar Karsten Blees3-8/+11
Assumes file names in git tree objects are UTF-8 encoded. On most unix systems, the system encoding (and thus the TCL system encoding) will be UTF-8, so file names will be displayed correctly. On Windows, it is impossible to set the system encoding to UTF-8. Changing the TCL system encoding (via 'encoding system ...', e.g. in the startup code) is explicitly discouraged by the TCL docs. Change git-gui functions dealing with file names to always convert from and to UTF-8. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-04Merge branch 'dr/ru' into puLibravatar Pat Thoyts1-431/+249
2016-10-04git-gui: Update Russian translationLibravatar Dimitriy Ryazantcev1-431/+249
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-04git-gui: maintain backwards compatibility for merge syntaxLibravatar Pat Thoyts1-1/+10
Commit b5f325c updated to use the newer merge syntax but continue to support older versions of git. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-03Merge branch 'va/i18n_2' into puLibravatar Pat Thoyts17-36/+35
2016-10-03git-gui i18n: mark string in lib/error.tcl for translationLibravatar Vasco Almeida1-1/+1
Mark string "$hook hook failed:" in lib/error.tcl for translation. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-03git-gui: fix incorrect use of Tcl append commandLibravatar Vasco Almeida15-26/+25
Fix wrong use of append command in strings marked for translation. According to Tcl/Tk Documentation [1], append varName ?value value value ...? appends all value arguments to the current value of variable varName. This means that append "[appname] ([reponame]): " [mc "File Viewer"] is setting a variable named "[appname] ([reponame]): " to the output of [mc "File Viewer"], rather than returning the concatenation of both expressions as one might expect. The format for some strings enables, for instance, a French translator to translate like "%s (%s) : Create Branch" (space before colon). Conversely, strings already translated will be marked as fuzzy and the translator must update them herself. For some cases, use alternative way for concatenation instead of using strcat procedure defined in git-gui.sh. Reference: 31bb1d1 ("git-gui: Paper bag fix missing translated strings", 2007-09-14) fixes the same issue slightly differently. [1] http://www.tcl.tk/man/tcl/TclCmd/append.htm Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-03git-gui i18n: mark "usage:" strings for translationLibravatar Vasco Almeida1-2/+2
Mark command-line "usage:" string for translation in git-gui.sh. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-03git-gui i18n: internationalize use of colon punctuationLibravatar Vasco Almeida4-7/+7
Internationalize use of colon punctuation ':' in options window, windows titles, database statistics window. Some languages might use a different style, for instance French uses "User Name :" (space before colon). Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2016-10-03Merge branch 'pt/non-mouse-usage' into puLibravatar Pat Thoyts2-42/+155
2016-10-03Merge branch 'pt/git4win-mods' into puLibravatar Pat Thoyts2-4/+11