summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-05git-gui: enable the Tk console when tracing/debugging on WindowsLibravatar Pat Thoyts1-0/+2
Without any standard channels the trace option is pretty useless on Win32 unless you can show the Tk console which captures such output. This also permits introspection of the running application to assist in debugging. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-10-05git-gui: show command-line errors in a messagebox on WindowsLibravatar Pat Thoyts1-10/+16
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-10-05On Windows, avoid git-gui to call Cygwin's nice utilityLibravatar Sebastian Schuberth1-0/+2
It's a common case for Windows developers to have both Cygwin and msysGit installed. Unfortunately, some scenarios also require to have Cygwin in PATH. By default, Cygwin comes with nice.exe, while msysGit does not. Since git-gui calls nice if it is in PATH, this results in Cygwin's nice.exe being called from msysGit's git-gui. Mixing Cygwin and msysGit generally is not a good idea, and in this particular case it causes differences not being correctly detected. So we only call nice.exe on Windows if it is in the same directory as git.exe. This way, this work-around does neither affect a pure Cygwin environment, or the case when nice.exe will be shipped with msysGit at some point in time. This fixes msysGit issue 394. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-09-14git-gui 0.13Libravatar Pat Thoyts1-1/+1
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-09-13git-gui: avoid mis-encoding the copyright message on Windows.Libravatar Pat Thoyts1-2/+2
On Windows the tcl script file will use the system encoding and attempting to convert the copyright mis-encodes the string. Instead, keep the message as ASCII and substitute in the correct unicode character when running. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-09-13git-gui: Update Swedish translation (521t).Libravatar Peter Krefting1-399/+403
Signed-off-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-18git-gui: ensure correct application termination in git-gui--askpassLibravatar Pat Thoyts1-6/+13
With Tk 8.5 the askpass utility can hang waiting for the wish shell implicit event loop to exit. This patch uses an explicit event loop to ensure correct application termination. Reported-by: Anders Kaseorg <andersk@mit.edu> Tested-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-12git-gui: handle textconv filter on Windows and in developmentLibravatar Pat Thoyts2-3/+15
When developing/testing we run git-gui.sh directly and the makefile configured variables are not properly set. Configure the new shellpath accessor to handle this case. On Windows we may not find the shell so in this case revert to simply executing the filter command without the shell intermediate. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-12git-gui: use shell to launch textconv filter in "blame"Libravatar Matthieu Moy3-1/+10
The textconv filters may include multiple arguments and may make use of unix shell features. To maintain compatibility with 'git blame' ensure these commands are passed through bash. Reported-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-08git-gui: display error launching blame as a message box.Libravatar Pat Thoyts1-1/+6
This does not appear to Windows users and can follow the form of the fatal error messages near the top of the script file. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-08git-gui: Make usage statement visible on Windows.Libravatar Pat Thoyts1-1/+7
On Windows stdout and stderr are not connected to anything so the usage statement is never shown to the user when an error is made with a command line like 'git gui browser'. Use a messagebox on windows. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-02git-gui: fix size and position of window panes on startupLibravatar Pat Thoyts1-18/+37
The themed panedwindow needs to have the sash position set after the widget has been mapped therefore apply this setting in the Map event binding. To avoid visible redraws as the application is constructed the main window should be withdrawn until all the widgets have been added Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-08-02git-gui: mc cannot be used before msgcat has been loadedLibravatar Pat Thoyts1-1/+1
If someone attempts to use an older version that Tk 8.4 the error was masked by the lack of a mc command. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: use textconv filter for diff and blameLibravatar Clément Poulain4-4/+51
Create a checkbox "Use Textconv For Diffs and Blame" in git-gui options. If checked and if the driver for the concerned file exists, git-gui calls diff and blame with --textconv option Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32Libravatar Pat Thoyts1-3/+8
On Windows the Control-C binding is used to copy and is mapped to the Tk virtual event <<Copy>>. In the initial git-gui dialog this is also bound as an accelerator for the Clone menu item. The effect is that both bindings run, copying the text but resetting the clone page or switching to the clone page when the user tries to copy text from one of the entry fields. This patch avoids this by using Control-L instead for Windows only. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix shortcut creation on cygwinLibravatar Heiko Voigt1-2/+2
When the user tried to create a desktop icon with git gui on cygwin wscript was complaining about an unknown option and displaying the non-native path as such. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix PATH environment for mingw development environmentLibravatar Heiko Voigt1-2/+3
When creating a desktop shortcut from the gui the shortcut directly starts wish with the git-gui script. In the msysgit development environment some dll's reside in the mingw/bin directory which causes that git can not start because libiconv2.dll is not found. When using such a link the error is even more cryptic stating: "child killed: unknown signal" Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix usage of _gitworktree when creating shortcut for windowsLibravatar Heiko Voigt1-2/+2
This fixes msysGit issue 425. Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-30git-gui: fix "Explore Working Copy" for Windows againLibravatar Markus Heidelberg1-1/+1
It has already been fixed in commit 454efb47 (git-gui (Win): make "Explore Working Copy" more robust, 2009-04-01), but has been broken in commit 21985a11 (git-gui: handle non-standard worktree locations, 2010-01-23) by accidentally replacing too much with a new variable. The problem can be reproduced when starting git-gui from within a subdirectory. The solution is to convert the path name, explorer.exe is invoked with, to a platform native name. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-10git-gui: fix usage of themed widgets variableLibravatar Heiko Voigt1-0/+1
There was one forgotten global so NS was not visible to the method which resulted in an error. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2010-07-10git-gui: Handle failure of core.worktree to identify the working directory.Libravatar Pat Thoyts1-0/+3
Commit 21985a11 'git-gui: handle non-standard worktree locations' attempts to use either GIT_WORK_TREE or core.worktree to set the _gitworktree variable but these may not be set which leads to a failure to launch gitk to review history. Use _gitdir to set the location for a standard git layout where the parent of the .git directory is the working tree. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-02-08Merge branch 'maint'Libravatar Shawn O. Pearce1-0/+3
* maint: git-gui: check whether systems nice command works or disable it
2010-02-08git-gui: check whether systems nice command works or disable itLibravatar Heiko Voigt1-0/+3
This fixes issue 394 from msysgit. It seems that the Gnuwin32 project provides a nice command but it returns a "not implemented" error. To help users we now try to execute once and disable it in case it fails. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-02-02git-gui: update french translationLibravatar Emmanuel Trillaud1-320/+366
Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-02-02git-gui: update Japanese translationLibravatar Nanako Shiraishi1-314/+339
Update ja.po to match 2010-01-26 version of pot file. Signed-off-by: しらいし ななこ <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-29Merge branch 'maint'Libravatar Shawn O. Pearce1-0/+2
* maint: git-gui: fix shortcut for menu "Commit/Revert Changes"
2010-01-29git-gui: fix shortcut for menu "Commit/Revert Changes"Libravatar Heiko Voigt1-0/+2
The shortcut was not properly recognized previously. Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-28git-gui: Quote git path when starting another gui in a submoduleLibravatar Jens Lehmann1-1/+1
In do_git_gui the path of the git executable has to be put into a list, otherwise calling it will fail when when spaces are present in its path. Reported-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-28git-gui: update Italian translationLibravatar Michele Ballabio1-299/+323
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-28git-gui: Update Swedish translation (520t0f0u)Libravatar Peter Krefting1-290/+324
Signed-off-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-27git-gui: use themed tk widgets with Tk 8.5Libravatar Pat Thoyts26-453/+697
This patch enables the use of themed Tk widgets with Tk 8.5 and above. These make a significant difference on Windows in making the application appear native. On Windows and MacOSX ttk defaults to the native look as much as possible. On X11 the user may select a theme using the TkTheme XRDB resource class by adding an line to the .Xresources file. The set of installed theme names is available using the Tk command 'ttk::themes'. The default on X11 is similar to the current un-themed style - a kind of thin bordered motif look. A new git config variable 'gui.usettk' may be set to disable this if the user prefers the classic Tk look. Using Tk 8.4 will also avoid the use of themed widgets as these are only available since 8.5. Some support is included for Tk 8.6 features (themed spinbox and native font chooser for MacOSX and Windows). Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-27git-gui: Update German translation (12 new or changed strings).Libravatar Christian Stimming1-398/+426
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-26git-gui: Update translation templateLibravatar Shawn O. Pearce1-282/+302
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-25git-gui: Remove unused icon file_parttickLibravatar Shawn O. Pearce1-9/+0
This icon hasn't been used in git gui. I think it dates back to the original set of icons I took from Paul Mackerras' prototype that I turned into git gui. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-25git-gui: use different icon for new and modified files in the indexLibravatar Peter Oberndorfer1-1/+1
This allows to quickly differentiate between new and modified files in the index without selecting the file and looking at the diff. Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: set GIT_DIR and GIT_WORK_TREE after setupLibravatar Giuseppe Bilotta1-23/+20
Rather than juggling with the env var GIT_DIR around the invocation of gitk, set it and GIT_WORK_TREE after finishing setup, ensuring that any external tool works with the setup we're running with. This also allows us to remove a couple of conditionals when running gitk or git gui in a submodule, as we know that the variables are present and have to be unset and reset before and after the invocation. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: update shortcut tools to use _gitworktreeLibravatar Giuseppe Bilotta1-3/+4
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: handle bare repos correctlyLibravatar Giuseppe Bilotta1-7/+36
Refactor checking for a bare repository into its own proc, that relies on git rev-parse --is-bare-repository if possible. For older versions of git we fall back to a logic such that the repository is considered bare if: * either the core.bare setting is true * or the worktree is not set and the directory name ends with .git The error message for the case of an unhandled bare repository is also updated to reflect the fact that the problem is not the funny name but the bareness. The new refactored proc is also used to disable the menu entry to explore the working copy, and to skip changing to the worktree before the gitk invocation. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: handle non-standard worktree locationsLibravatar Giuseppe Bilotta1-9/+28
Don't rely on the git worktree being the updir of the gitdir, since it might not be. Instead, define (and use) a new _gitworktree global variable, setting it to $GIT_WORK_TREE if present, falling back to core.worktree if defined, and finally to whatever we guess the correct worktree is. Getting core.worktree requires the config from the alleged git dir _gitdir to be loaded early. Supporting non-standard worktree locations also breaks the git-gui assumption (made when calling gitk) that the worktree was the dirname of $_gitdir and that, by consequence, the git dir could be set to the tail of $_gitdir once we changed to the worktree root directory. Therefore, we need to export a GIT_DIR environment variable set to the full, normalized path of $_gitdir instead. We also skip changing to the worktree directory if it's empty (i.e. if we're working on a bare repository). Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: Support applying a range of changes at onceLibravatar Jeff Epler2-104/+153
Multiple lines can be selected in the diff viewer and applied all at once, rather than selecting "Stage Line For Commit" on each individual line. Signed-off-by: Jeff Epler <jepler@unpythonic.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: Add a special diff popup menu for submodulesLibravatar Jens Lehmann1-16/+110
To make it easier for users to deal with submodules, a special diff popup menu has been added for submodules. The "Show Less Context" and "Show More Context" entries have been removed, as they don't make any sense for a submodule summary. Four new entries are added to the top of the popup menu to gain access to more detailed information about the changes in a submodule than the plain summary does offer. These are: - "Visualize These Changes In The Submodule" starts gitk showing the selected commit range - "Visualize These Changes In The Submodule" starts gitk showing the whole submodule history of the current branch - "Visualize All Branch History In The Submodule" starts gitk --all in the submodule - "Start git gui In The Submodule" guess what :-) Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: Use git diff --submodule when availableLibravatar Jens Lehmann1-4/+13
Doing so is much faster and gives the same output. Here are some numbers: $ time git submodule summary real 0m0.219s user 0m0.050s sys 0m0.111s $ time git diff --submodule real 0m0.012s user 0m0.003s sys 0m0.009s Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: work from the .git dirLibravatar Giuseppe Bilotta1-0/+10
When git-gui is run from a .git dir, _gitdir would be set to "." by rev-parse, something that confuses the worktree detection. Fix by expanding the value of _gitdir to pwd in this special case. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: Fix applying a line when all following lines are deletionsLibravatar Jeff Epler1-0/+1
If a diff looked like: @@ context -del1 -del2 and you wanted to stage the deletion 'del1', the generated patch wouldn't apply because it was missing the line 'del2' converted to context, but this line was counted in the @@-line Signed-off-by: Jeff Epler <jepler@unpythonic.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: Correct file_states when unstaging partly staged entryLibravatar Jens Lehmann1-0/+3
When unstaging a partly staged file or submodule, the file_states list was not updated properly (unless unstaged linewise). Its index_info part did not contain the former head_info as it should have but kept its old value. This seems not to have had any bad effects but diminishes the value of the file_states list for future enhancements. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: Fix gitk for branch whose name matches local fileLibravatar Peter Krefting1-1/+1
When trying to run gitk on a branch name whose name matches a local file, it will toss an error saying that the name is ambiguous. Adding a pair of dashes will make gitk parse the options to the left of it as branch names. Since wish eats the first pair of dashes we throw at it, we need to add a second one to ensure they get through. Signed-off-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in syncLibravatar Christopher Beelby1-0/+4
When the number of recent repo's gets to ten there can be a situation where an item is removed from the .gitconfig file via a call to git config --unset, but the internal representation of that file (repo_config(gui.recentrepo)) is not updated. Then a subsequent attempt to remove an item from the list fails because git-gui attempts to call --unset on a value that has already been removed. This leads to duplicates in the .gitconfig file, which then also cause errors if the git-gui tries to --unset them (rather than using --unset-all. --unset-all is not used because it is not expected that duplicates should ever be allowed to exist.) When loading the list of recent repositories (proc _get_recentrepos) if a repo in the list is not considered a valid git reposoitory then we should go ahead and remove it so it doesn't take up a slot in the list (since we limit to 10 items). This will prevent a bunch of invalid entries in the list (which are not shown) from making valid entries dissapear off the list even when there are less than ten valid entries. See: http://code.google.com/p/msysgit/issues/detail?id=362 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-23git-gui: handle really long error messages in updateindex.Libravatar Pat Thoyts1-16/+18
As reported to msysGit (bug #340) it is possible to get some very long error messages when updating the index. The use of a label to display this prevents scrolling the output. This patch replaces the label with a scrollable text widget configured to look like a label. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-06git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"Libravatar Vitaly _Vi Shukela1-2/+8
Signed-off-by: Vitaly _Vi Shukela <public_vi@tut.by> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-01-06git-gui: Makefile: consolidate .FORCE-* targetsLibravatar Jonathan Nieder1-4/+3
Providing multiple targets to force a rebuild is unnecessary complication. Avoid using a name that could conflict with future special targets in GNU make (a leading period followed by uppercase letters). Cc: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>