Commit Graph

944 Commits

Author SHA1 Message Date
Vietor Liu
acb9108c19 git-gui: adjust the minimum height of diff pane for shorter screen height
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-10-27 11:25:59 -07:00
Jens Lehmann
cd846aa183 git-gui: fix use of uninitialized variable
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-25 16:42:00 -07:00
Alexey Borzenkov
ed7b603381 git-gui: store wm state and fix wm geometry
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-09-12 11:35:29 -07:00
Shawn O. Pearce
118d938812 git-gui: Ensure submodule path is quoted properly
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-26 17:42:50 -07:00
Jens Lehmann
af413de47b git-gui: fix diff for partially staged submodule changes
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-26 17:35:16 -07:00
Alex Riesen
b350e460da git-gui: Update russian translation
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-12 08:34:37 -07:00
Dan Zwell
dd6451f9c7 git-gui: Limit display to a maximum number of files
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-12 07:41:52 -07:00
Heiko Voigt
2112be7650 git-gui: remove warning when deleting correctly merged remote branch
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-10 08:47:34 -07:00
Jimmy Angelakos
2ee94d141e git-gui: Added Greek translation & glossary
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-10 08:43:07 -07:00
Jens Lehmann
246295bdeb git-gui: display summary when showing diff of a submodule
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-08-10 08:30:26 -07:00
Daniel A. Steffen
a91be3fcbe git-gui: Fixes for Mac OS X TkAqua
- 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-05-01 15:04:52 -07:00
Alex Riesen
c736b4c83b git-gui: Update Russian translation
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-29 08:37:23 -07:00
Jens Lehmann
b4c813bc71 git-gui: run post-checkout hook after clone
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-08 07:42:54 -07:00
Shawn O. Pearce
4339d5109c Merge branch 'maint'
* maint:
  git-gui: Ensure consistent usage of mergetool.keepBackup
  git-gui: fix use of undeclared variable diff_empty_count
2009-04-08 07:41:13 -07:00
Ferry Huberts
fb25092a88 git-gui: Ensure consistent usage of mergetool.keepBackup
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-08 07:40:58 -07:00
Joerg Bornemann
8052e788b5 git-gui: fix use of undeclared variable diff_empty_count
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-08 07:38:11 -07:00
Markus Heidelberg
b01d432604 git-gui (Win): make starting via "Git GUI Here" on .git/ possible
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-05 13:06:24 -07:00
Markus Heidelberg
454efb47b6 git-gui (Win): make "Explore Working Copy" more robust
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-05 13:05:29 -07:00
Jens Lehmann
c9498339a4 git-gui: run post-checkout hook on checkout
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-05 12:58:26 -07:00
Jens Lehmann
f0d4eec99f git-gui: When calling post-commit hook wrong variable was cleared.
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-05 12:45:40 -07:00
Markus Heidelberg
3eb5682b0b git-gui: use git --html-path to get the location of installed HTML docs
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>
2009-04-05 12:29:10 -07:00
Shawn O. Pearce
122ee54420 Merge branch 'maint'
* maint:
  git-gui: fix deleting from the context menu with empty selection
2009-03-30 07:09:28 -07:00
Markus Heidelberg
bf516ecaac git-gui: fix deleting from the context menu with empty selection
An "Application Error" was raised when trying to delete text from the
commit message field when no text was selected.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-03-30 07:06:37 -07:00
Sam Hocevar
966d0778db git-gui: minor spelling fix and string factorisation.
Properly spell "successful" and slightly rewrite a couple of strings
that actually say the same thing in order to reduce translation work.

Update .pot and .po files accordingly since no new translation is
required.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-03-24 16:17:30 -07:00
Sam Hocevar
b59f091d80 git-gui: various French translation fixes
Mostly grammar, spelling and typography fixes, but also a few wording
enhancements here and there.

Signed-off-by: Sam Hocevar <sam@zoy.org>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-03-24 16:16:42 -07:00
Shawn O. Pearce
b0d644b658 Merge branch 'maint' 2009-03-20 14:44:48 -07:00
Jens Lehmann
e27430e777 git-gui: Fix merge conflict display error when filename contains spaces
When a merge conflict occurs in a file with spaces in the filename,
git-gui showed wrongly "LOCAL: deleted".

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-03-20 14:44:28 -07:00
Shawn O. Pearce
73fea17364 Merge branch 'maint'
* maint:
  git-gui: don't hide the Browse button when resizing the repo chooser
2009-03-16 20:01:27 -07:00
Markus Heidelberg
379f84b8d1 git-gui: don't hide the Browse button when resizing the repo chooser
Rather shrink the input field for "Create New Repository" and "Open
Existing Repository" as it's already done for "Clone Existing
Repository".

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-03-16 19:57:48 -07:00
Phil Lawrence
880fa117f1 Append ampersand to "Target" of lnk files created by do_cygwin_shortcut
The git-gui menu item "Repository | Create Desktop Icon" creates a
shortcut (.lnk file) on the Windows desktop.  The purpose of the
created shortcut is to make it easy for a user to launch git-gui
for a particular repo in the future.

A Windows user would expect to see git gui launch when they click
the shortcut; they would not expect (nor want) to see a cmd window
open and remain open in the background.

msysGit avoids opening a command window altogether when it's Git GUI
shortcut is used.  Ideally, git on cygwin would also have shortcuts
that simply open the GUI, but as a first step, this change allows
the shell window to politely disappear after starting git gui as a
background process.

Signed-off-by: Phil Lawrence <prlawrence@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-03-09 16:21:17 -07:00
Alexander Gavrilov
764369c5ea git-gui: Support more git version notations.
Recently the msysgit repository has got a '1.6.1-msysgit1'
tag, which, when used to build the git version, is not
handled gracefully by the git-gui version code.

This patch changes the regular expressions to fix it, and
removes the hardcoded 'rc' string. Now git-gui can accept
a version tail like '.foo123.GIT.bar.456.7.g89ab'

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-02-08 11:50:58 -08:00
Alexander Gavrilov
584fa9ccf4 git-gui: Avoid an infinite rescan loop in handle_empty_diff.
If the index update machinery and git diff happen to disagree
on whether a particular file is modified, it may cause git-gui
to enter an infinite index rescan loop, where an empty diff
starts a rescan, which finds the same set of files modified,
and tries to display the diff for the first one, which happens
to be the empty one. A current example of a possible disagreement
point is the autocrlf filter.

This patch breaks the loop by using a global counter to track
the auto-rescans. The variable is reset whenever a non-empty
diff is displayed.

Another suggested approach, which is based on giving the
--exit-code argument to git diff, cannot be used, because
diff-files seems to trust the timestamps in the index, and
returns a non-zero code even if the file is actually
unchanged, which essentially defeats the purpose of the
auto-rescan logic.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-02-08 11:50:11 -08:00
Alexander Gavrilov
06569cd5be git-gui: Fix post-commit status with subject in non-locale encoding
As pointed out in msysgit bug #181, when a non-locale encoding is
used for commits, post-commit status messages display the subject
incorrectly.  It happens because the file handle is not properly
configured before the subject is read back.

This patch fixes it by factoring out the code that is used to setup
the output handle into a separate function, and calling it from
the reading code.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Acked-by: Robin Rosenberg <robin.rosenberg@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-02-01 14:56:54 -08:00
Shawn O. Pearce
e612120d23 git-gui 0.12
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-17 20:15:17 -08:00
Johannes Schindelin
d4d1351b96 git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL
In dc871831(Only use GIT_CONFIG in "git config", not other programs),
GIT_CONFIG_LOCAL was rested in peace, in favor of not reading
/etc/gitconfig and $HOME/.gitconfig at all when GIT_CONFIG is set.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-17 07:50:55 -08:00
Miklos Vajna
b8dc2f5c94 git-gui: Update Hungarian translation for 0.12
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-10 11:44:03 -08:00
Peter Krefting
93b6d7c191 git-gui: Fixed typos in Swedish translation.
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-10 11:43:15 -08:00
Peter Krefting
7f64a661d2 git-gui: Updated Swedish translation (515t0f0u).
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-09 07:35:01 -08:00
Michele Ballabio
64bcf58541 git gui: update Italian translation
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-09 07:20:08 -08:00
Nanako Shiraishi
e882c6e3e7 git-gui: Update Japanese translation for 0.12
Adds translation for one new message string.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-09 07:11:20 -08:00
Fredrik Skolmli
9c996d0c24 git-gui: Starting translation for Norwegian
This file have been used locally for some time, and is near
completion. Will put an effort into completing it later on,
or just leave it as an excercise for other Norwegians.

Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-08 09:32:11 -08:00
Christian Stimming
07bba555d4 git-gui: Update German (completed) translation.
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-08 08:49:56 -08:00
Shawn O. Pearce
8a33356085 git-gui: Update po template to include 'Mirroring %s' message
A late addition to the message library.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-08 08:33:05 -08:00
Alexander Gavrilov
3ac31e4451 git-gui: Fix commit encoding handling.
Commits without an encoding header are supposed to
be encoded in utf8. While this apparently hasn't always
been the case, currently it is the active convention, so
it is better to follow it; otherwise people who have to
use commitEncoding on their machines are unable to read
utf-8 commits made by others.

I also think that it is preferrable to display the warning
about an unsupported value of commitEncoding more prominently,
because this condition may lead to surprising behavior and,
eventually, to loss of data.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-08 08:33:05 -08:00
Alexander Gavrilov
95e706b5ec git-gui: Fix handling of relative paths in blame.
Currently using '..' or '.' in the file path for gui blame
causes it to break, because the path is passed inside the
SHA:PATH spec to cat-file, which apparently does not understand
such items. As a result, cat-file returns nothing, and the
viewer crashes because of an "index out of range" error.

This commit adds a simple function that normalizes such paths.
I choose not to use [file normalize], because it uses some data
from the file system, e.g. dereferences symlinks, and creates
an absolute path, while blame may be used to inspect historical
information that bears no relation to the current filesystem state.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-08 08:33:05 -08:00
Mark Burton
861c68e3b6 git-gui: Teach start_push_anywhere_action{} to notice when remote is a mirror.
When the destination repository is a mirror, this function goofed by still
passing a refspec to git-push. Now it notices that the remote is a mirror
and holds the refspec.

Signed-off-by: Mark Burton <markb@ordern.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-02 07:20:19 -08:00
Nanako Shiraishi
6249067c61 git-gui: update Japanese translation
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-26 14:13:30 -08:00
Christian Couder
1a93d67ba8 git-gui: french translation update
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-23 12:53:45 -08:00
Peter Krefting
f6e4110bcd Updated Swedish translation (514t0f0u).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-21 07:07:02 -08:00
Michele Ballabio
3cf2801c41 git gui: update Italian translation
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-19 11:17:39 -08:00