summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2009-12-07git-gui: suppress RenderBadPicture X error caused by Tk bugLibravatar Jindrich Makovicka1-0/+5
Due to a bug in Tk, git-gui almost always (unless git-gui is closed right after starting) produces an X window error message on exit, something like: X Error of failed request: RenderBadPicture (invalid Picture parameter) Major opcode of failed request: 150 (RENDER) Minor opcode of failed request: 7 (RenderFreePicture) Picture id in failed request: 0x3a000dc Serial number of failed request: 1965 Current serial number in output stream: 1980 Respective Tk bug report is here: http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997 This bug is triggered only when the send command is blocked via rename send {} . The following patch re-enables send just before quiting git-gui to suppress the error. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-05git-gui: Increase blame viewer usability on MacOS.Libravatar Alexander Gavrilov1-1/+15
On MacOS raising a window causes the focus to be transferred to it -- although it may actually be a bug in the Tcl/Tk port. When this happens with the blame viewer tooltips, it makes the interface less usable, because Entry and Leave handlers on the text view cause the tip to disappear once the mouse is moved even 1 pixel. This commit makes the code raise the main window on MacOS when Tk 8.5 is used. This version seems to properly support wm transient by making the tip stay on top of the master, so reraising the master does not cause it to disappear. Thus the only remaining sign of problems is slight UI flicker when focus is momentarily transferred to the tip and back. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-05git-gui: search 4 directories to improve statistic of gc hintLibravatar Clemens Buchacher1-11/+10
On Windows, git-gui suggests running the garbage collector if it finds 1 or more files in .git/objects/42 (as opposed to 8 files on other platforms). The probability of that happening if the repo contains about 100 loose objects is 32%. The probability for the same to happen when searching 4 directories is only 8%, which is bit more reasonable. Also remove $objects_limit from the message, because we already know that we are above (or close to) that limit. Telling the user about that number does not really give him any useful information. The following octave script shows the probability for at least m*q objects to be found in q subdirectories of .git/objects if n is the total number of objects. q = 4; m = [1 2 8]; n = 0:10:2000; P = zeros(length(n), length(m)); for k = 1:length(n) P(k, :) = 1-binocdf(q*m-1, n(k), q/(256-q)); end plot(n, P); n \ q 1 4 50 18% 1% 100 32% 8% 200 54% 39% 500 86% 96% Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-05git gui: make current branch default in "remote delete branch" merge checkLibravatar Heiko Voigt1-1/+7
We already do the same when locally deleting a branch. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-10-27git-gui: adjust the minimum height of diff pane for shorter screen heightLibravatar Vietor Liu1-1/+1
When the main window is maximized, if the screen height is shorter (e.g. Netbook screen 1024x600), both the partial commit pane and the status bar are hidden. The diff pane is resizable, so that it can use less vertical height, allowing the overall window to be shorter and still display both the entire commit pane and status bar. Signed-off-by: Vietor Liu <vietor@vxwo.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-25git-gui: fix use of uninitialized variableLibravatar Jens Lehmann1-0/+1
This fixes a bug introduced by the "display summary when showing diff of a submodule" patch. It lead to a "no such variable" error when opening the diff context menu while no diff was shown. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-12git-gui: store wm state and fix wm geometryLibravatar Alexey Borzenkov1-0/+21
I often close git gui window when it is maximized, and when I reopen it next time the it would usually become out of place (e.g. a huge window with a top-left corner somewhere close to the center of the screen). Fix it by storing and restoring wm state in config, as well as setting wm state to normal before retrieving wm geometry info. Signed-off-by: Alexey Borzenkov <snaury@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-26git-gui: Ensure submodule path is quoted properlyLibravatar Shawn O. Pearce1-2/+2
When quoting an arbitrary user string in Tcl, its better to use [list ...] than to use {...}, in case the user string has spaces or { embedded within it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-26git-gui: fix diff for partially staged submodule changesLibravatar Jens Lehmann1-4/+6
When a submodule commit had already been staged and another commit had been checked out inside the submodule, the diff always displayed the submodule commit log messages between the last supermodule commit and the working tree, totally ignoring the commit in the index. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-12git-gui: Update russian translationLibravatar Alex Riesen1-12/+16
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-12git-gui: Limit display to a maximum number of filesLibravatar Dan Zwell2-1/+21
When there is a large number of new or modified files, "display_all_files" takes a long time, and git-gui appears to hang. This change limits the number of files that are displayed. This limit can be set as gui.maxfilesdisplayed, and is 5000 by default. A warning is shown the first time the list of files is truncated in this GUI session. Subsequent truncations are not mentioned to the user. Signed-off-by: Dan Zwell <dzwell@zwell.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-10git-gui: remove warning when deleting correctly merged remote branchLibravatar Heiko Voigt1-7/+9
If the user wants to delete a remote branch and selects the correct "merged into" we should not warn that "Recovering deleted branches is difficult". For local branches we do the same already. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-10git-gui: Added Greek translation & glossaryLibravatar Jimmy Angelakos2-0/+2176
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-10git-gui: display summary when showing diff of a submoduleLibravatar Jens Lehmann2-3/+29
As it is hard to say what changed in a submodule by looking at the hashes, let's show the colored submodule summary instead. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-05-01git-gui: Fixes for Mac OS X TkAquaLibravatar Daniel A. Steffen2-19/+22
- detect more Tk.framework variants - fix apple menu setup, use native preferences menu item - don't set menu font Signed-off-by: Daniel A. Steffen <das@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-29git-gui: Update Russian translationLibravatar Alex Riesen1-401/+979
Also, the previous translations of the words 'tag' and 'merge' were changed. Added translation of the 'Tool' submenu. Thanks go to Alexander Gavrilov and Dmitry Potapov for proofreading and suggestions. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-08git-gui: run post-checkout hook after cloneLibravatar Jens Lehmann1-1/+28
git-gui is using "git-read-tree -u" when cloning which doesn't invoke the post-checkout hook as a plain git-clone would. So git-gui must call the hook itself. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-08Merge branch 'maint'Libravatar Shawn O. Pearce2-2/+3
* maint: git-gui: Ensure consistent usage of mergetool.keepBackup git-gui: fix use of undeclared variable diff_empty_count
2009-04-08git-gui: Ensure consistent usage of mergetool.keepBackupLibravatar Ferry Huberts2-2/+2
In several places merge.keepBackup is used i.s.o. mergetool.keepBackup. This patch makes it all consistent. Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-08git-gui: fix use of undeclared variable diff_empty_countLibravatar Joerg Bornemann1-0/+1
Commit 584fa9cc introduced the global variable diff_empty_count, which is used in diff.tcl. This variable wasn't declared anywhere which resulted in an ugly error message box instead of the intended informative message. Signed-off-by: Joerg Bornemann <joerg.bornemann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-05git-gui (Win): make starting via "Git GUI Here" on .git/ possibleLibravatar Markus Heidelberg1-1/+6
This works around git-gui's error message Cannot use funny .git directory: . when started from the .git/ directory, which is useful in repositories without any directories for the right click. Now git-gui can be started via Windows Explorer shell extension (Git GUI Here) from the .git/ directory. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-05git-gui (Win): make "Explore Working Copy" more robustLibravatar Markus Heidelberg1-1/+1
Starting the Explorer from the git-gui menu "Explore Working Copy" didn't work, when git-gui was started via Windows Explorer shell extension (Git GUI Here) from a directory within the project. The Explorer raised an error message like this: Path "C:/somedir/worktree" is not available or not a directory It worked when started from the project directory itself, because then the path argument for the Explorer was just '.' (current directory) without any problematic forward slashes. To make it work, convert the path given as argument to explorer.exe to its native format with backslashes. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-05git-gui: run post-checkout hook on checkoutLibravatar Jens Lehmann1-4/+39
git-gui is using "git-read-tree -u" for checkout which doesn't invoke the post-checkout hook as a plain git-checkout would. So git-gui must call the hook itself. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-05git-gui: When calling post-commit hook wrong variable was cleared.Libravatar Jens Lehmann1-3/+3
Before calling the post-commit hook, the variable "pc_err" is cleared while later only "pch_error" is used. "pch_error$cmt_id" only appeared in "upvar"-Statements (which were changed to "global") and was removed. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-04-05git-gui: use `git --html-path` to get the location of installed HTML docsLibravatar Markus Heidelberg1-4/+29
Previously a hardcoded path $GIT_EXEC_PATH/../Documentation/ was used to search for the documentation, when the user has asked for it via menu "Help -> Online Documentation". This didn't work for the default directory structure. To find the path reliably, use the new git command line option, which returns the correct path. If the output of `git --html-path` is empty because git is not found or the option is not yet supported in the installed git, the documentation from kernel.org is launched. There is no additional guessing of the right location of the installed docs. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>