Commit Graph

1106 Commits

Author SHA1 Message Date
Pat Thoyts 8a383db4b2 git-gui 0.18
Signed-off-by: Pat Thoyts <>
2013-06-15 23:53:34 +01:00
Pat Thoyts 5c37033edf git-gui: avoid an error message when removing the last remote
When the last remote is removed on a system that has tearoff menu items
the code that adjusts the fetch and prune menus may raise an error when
probing the menu entry for a non-existing -label option.
Check the entry type to avoid this fault.

Reported-by: Vedran Miletić <>
Signed-off-by: Pat Thoyts <>
2013-06-15 23:36:27 +01:00
John Keeping 2f38dd03fc git-gui: fix file name handling with non-empty prefix
Commit e3d06ca (git-gui: Detect full path when parsing arguments -
2012-10-02) fixed the handling of absolute paths passed to the browser
and blame subcommands by checking whether the file exists without the
prefix before prepending the prefix and checking again.  Since we have
chdir'd to the top level of the working tree before doing this, this
does not work if a file with the same name exists in a subdirectory and
at the top level (for example Makefile in git.git's t/ directory).

Instead of doing this, revert that patch and fix absolute path issue by
using "file join" to prepend the prefix to the supplied path.  This will
correctly handle absolute paths by skipping the prefix in that case.

Acked-by: Andrew Wong <>
Signed-off-by: John Keeping <>
Signed-off-by: Pat Thoyts <>
2013-06-07 23:03:29 +01:00
Stefan Haller 7d2017e773 git-gui: bring wish process to front on Mac
On Mac OS X, any application that is started from the Terminal will open
behind all running applications; as a work-around, manually bring ourselves
to the front. (Stolen from gitk, commit 76bf6ff93e.)

We do this as the very first thing, so that any message boxes that might pop
up during the rest of the startup sequence are actually seen by the user.

[PT: added catch and moved down to ensure Tk has been loaded]

Signed-off-by: Stefan Haller <>
Signed-off-by: Pat Thoyts <>
2013-06-07 01:34:42 +01:00
Pat Thoyts ed05e9f6c0 git-gui: change dialog button positions for Windows to suit platform.
On windows it is more common to have cancel furthest on the right.

Signed-off-by: Pat Thoyts <>
2013-05-17 10:51:01 +01:00
Heiko Voigt 1fcd24d043 git-gui: allow "\ No newline at end of file" for linewise staging
Counting of lines did not skip this line when generating the hunk

Acked-by: Tobias Preuss <>
Signed-off-by: Heiko Voigt <>
Signed-off-by: Pat Thoyts <>
2013-05-16 23:40:59 +01:00
Pat Thoyts 60468d6c89 git-gui: fix the mergetool launcher for the Beyond Compare tool.
When using Beyond Compare as the mergetool it fails to save the merged
result correctly due to a quoting problem when executing the tool.
This patch solves the quoting problem.

Signed-off-by: Warren Falk <>
Signed-off-by: Pat Thoyts <>
2013-02-22 20:13:21 +00:00
Christian Couder 9f316463ba Makefile: replace "echo 1>..." with "echo >..."
This is clearer to many people this way.

Signed-off-by: Christian Couder <>
Signed-off-by: Junio C Hamano <>
Signed-off-by: Pat Thoyts <>
2012-12-25 00:21:59 +00:00
Grahack ab571ef02f French translation: copy -> copie.
Signed-off-by: Pat Thoyts <>
2012-11-28 21:29:21 +00:00
Kirill Smelkov 552ee61ece git-gui: Fix parsing of <rev> <path-which-not-present-in-worktree>
Commit e3d06ca9 (git-gui: Detect full path when parsing arguments) broke

    git gui blame rev path-not-present-in-worktree

in particular this does not work anymore:

    # in linux.git
    $ git gui blame 2bb8c26242c2393b097a993ffe9b003ec9b85395 drivers/net/sky2.c

This patch restores the original functionality in this case.

Acked-by: Andrew Wong <>
Signed-off-by: Kirill Smelkov <>
Signed-off-by: Pat Thoyts <>
2012-11-13 23:52:14 +00:00
Pat Thoyts f6dd784ed4 git-gui 0.17
Signed-off-by: Pat Thoyts <>
2012-10-17 21:57:29 +01:00
Andrew Wong df46eda388 git-gui: Don't prepend the prefix if value looks like a full path
When argument parsing fails to detect a file name, "git-gui" will try to
use the previously detected "head" as the file name. We should avoid
prepending the prefix if "head" looks like a full path.

Signed-off-by: Andrew Wong <>
Signed-off-by: Pat Thoyts <>
2012-10-17 21:47:50 +01:00
Andrew Wong e3d06ca93e git-gui: Detect full path when parsing arguments
When running "git-gui blame" from a subfolder (which means prefix is
non-empty), if we pass a full path as argument, the argument parsing
will fail to recognize the argument as a file name, because prefix is
prepended to the argument.

This patch handles that scenario by adding an additional branch that
checks the file name without using the prefix.

Signed-off-by: Andrew Wong <>
Signed-off-by: Pat Thoyts <>
2012-10-17 21:47:49 +01:00
Beat Bolli 5a5e4d2599 git-gui: remove .git/CHERRY_PICK_HEAD after committing
Adding _git_ps1() to one's bash prompt displays various repo status
info after each command. After committing a git cherry-pick -n using
git-gui, the prompt still contains the "|CHERRY-PICKING" flag.

Delete the file causing this flag when cleaning up.

Signed-off-by: Beat Bolli <>
Signed-off-by: Pat Thoyts <>
2012-09-17 11:59:05 +01:00
Beat Bolli 9ef750875a git-gui: Fix a loose/lose mistake
Acked-by: Junio C Hamano <>
Signed-off-by: Beat Bolli <>
Signed-off-by: Pat Thoyts <>
2012-09-17 11:53:37 +01:00
Vitaly _Vi Shukela 44e88ce078 git-gui: Fix semi-working shortcuts for unstage and revert
Make Ctrl+U for unstaging and Ctrl+J for reverting selection behave
more like Ctrl+T for adding.

They were working only when one area was focused (diff or commit message),
now they should work everywhere.

Acked-by: Bert Wesarg <>
Signed-off-by: Vitaly _Vi Shukela <>
Signed-off-by: Pat Thoyts <>
2012-09-17 09:23:35 +01:00
Pat Thoyts 272b929639 Merge branch 'rt/trans' 2012-06-19 21:34:11 +01:00
Ralf Thielow 1a8cdacb51 git-gui: de.po: translate "remote" as "extern"
According to the translation in git-core, we
translate "remote" as "extern".

Signed-off-by: Ralf Thielow <>
Signed-off-by: Pat Thoyts <>
2012-06-19 21:31:14 +01:00
Ralf Thielow 774b79fbb8 git-gui: de.po: translate "bare" as "bloß"
According to the translation in git-core, we
translate "bare" as "bloß".

Signed-off-by: Ralf Thielow <>
Signed-off-by: Pat Thoyts <>
2012-06-19 21:31:14 +01:00
Ralf Thielow 3c3737deab git-gui: de.po: consistently add untranslated hook names within braces
The user might not really know what hook is
actually meant if it's translated. To avoid such
a confusion we should consistently write it untranslated
within braces after.

Signed-off-by: Ralf Thielow <>
Signed-off-by: Pat Thoyts <>
2012-06-19 21:31:14 +01:00
Pat Thoyts fda1ba02f3 git-gui: preserve commit messages in utf-8
The commit message buffer is automatically preserved to a local file
but this uses the system encoding which may fail to properly encode
unicode text. Forcing this file to use utf-8 preserves the message

Reported-by: Ángel José Riesgo <>
Signed-off-by: Pat Thoyts <>
2012-04-19 14:07:39 +01:00
Heiko Voigt c42939d24e git-gui: open console when using --trace on windows
When starting a gui program on windows stdout, stderr and stdin are not
connected to the cmd console. As a workaround tk has a console window.
Lets open this when the --trace commandline option has been given.
This is helpful for debugging.

Signed-off-by: Heiko Voigt <>
Signed-off-by: Pat Thoyts <>
2012-03-25 13:24:14 +01:00
Benjamin Kerensa ef42057dea git-gui: fix a typo in po/ files
"succeeded" was misspelled in the code, which propagated throughout the

Fixed all of them.

Signed-off-by: Benjamin Kerensa <bkerensa <at>>
Signed-off-by: Pat Thoyts <>
2012-03-10 23:25:34 +00:00
Marcus Karlsson 446f8226dd git-gui: Use PWD if it exists on Mac OS X
The current working directory is set to / when git-gui is invoked
using the Git bundle on Mac OS X. This means that if it is
launched from a directory which contains a repository then git-gui
won't automatically find it unless the repository happens to be
located in /.

The PWD environment variable is however preserved if the bundle is
invoked using open(1). If git-gui would check for PWD then a user
could for example type open -a 'Git Gui' on a command line in order to
launch the program and it would automatically find the repository.

Teach git-gui to use the PWD environment variable on Mac OS X.

Signed-off-by: Marcus Karlsson <>
Signed-off-by: Junio C Hamano <>
Signed-off-by: Pat Thoyts <>
2012-03-10 23:16:24 +00:00
Clemens Buchacher ba5d445b65 git-gui: fix git-gui crash due to uninitialized variable
Recently, a clone initiated via git gui on Windows crashed on me due to
an "unknown variable cdone". It turns out that there is a code path
where this variable is used uninitialized.

Signed-off-by: Clemens Buchacher <>
Signed-off-by: Pat Thoyts <>
2012-01-22 23:16:03 +00:00
Pat Thoyts 942e6baa92 git-gui 0.16
Signed-off-by: Pat Thoyts <>
2011-12-13 23:44:30 +00:00
Pat Thoyts 7d076d5675 git-gui: handle shell script text filters when loading for blame.
When loading a file into the blame window git-gui does all the work and
must handle the text conversion filters if defined. On Windows it is
necessary to detect the need for a shell script explicitly.

Such filter commands are run using non-blocking I/O but this has the
unfortunate side effect of losing any error that might be reported when
the pipe is closed. Switching to blocking mode just before closing
enables reporting of errors in the filter scripts to the user.

Tested-by: Sebastian Schuberth <>
Signed-off-by: Pat Thoyts <>
2011-12-09 15:14:32 +00:00
Samuel Bronson 215d4fdbaa git-gui: Set both 16x16 and 32x32 icons on X to pacify Xming.
It would be better if the 32x32 icon was equivalent to the one used on
Windows (in git-gui.ico), but I'm not sure how that would best be done,
so I copied this code from gitk instead.

Signed-off-by: Samuel Bronson <>
Signed-off-by: Pat Thoyts <>
2011-12-07 12:48:34 +00:00
Pat Thoyts af86768334 git-gui: added config gui.gcwarning to disable the gc hint message
On startup in multicommit mode git-gui checks to see if the repository
has a lot of objects. If so it shows a dialog suggesting gc be run.
This adds 'gui.gcwarning' as a control config variable to allow this
to be disabled. The default is true (the warning is shown). Setting this
false will prevent the check being done.

Signed-off-by: Pat Thoyts <>
2011-11-30 14:37:26 +00:00
Pat Thoyts 6f01e20e25 git-gui: set whitespace warnings appropriate to this project
Signed-off-by: Pat Thoyts <>
2011-11-30 11:35:28 +00:00
Bert Wesarg d8d166bf09 git-gui: don't warn for detached head when rebasing
Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-11-05 00:39:04 +00:00
Bert Wesarg f49517a862 git-gui: make config gui.warndetachedcommit a boolean
Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-11-05 00:39:03 +00:00
Tilman Vogel 54531e7c7a git-gui: add config value gui.diffopts for passing additional diff options
Signed-off-by: Tilman Vogel <>
Signed-off-by: Pat Thoyts <>
2011-11-05 00:38:01 +00:00
Pat Thoyts 3f2fb173ac git-gui: sort the numeric ansi codes
This ensures that underline does not conflict with inverse colors.

Signed-off-by: Pat Thoyts <>
2011-11-04 16:16:54 +00:00
Pat Thoyts 9af6413b96 git-gui: support underline style when parsing diff output
Suggested-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-11-04 16:16:52 +00:00
Dejan Ribič 4198579b0a git-gui: fix spelling error in sshkey.tcl
Spelling error originally reported to Ubuntu as launchpad bug #879427.

Acked-by: Erik Faye-Lund <>
Signed-off-by: Dejan Ribič <>
Signed-off-by: Pat Thoyts <>
2011-10-31 08:58:18 +00:00
Bert Wesarg 95fa862b57 git-gui: include the file path in guitools confirmation dialog
For those guitools that require a filename, display this filename when
asking the user to confirm the tool launch.

[PT: modified to use positional parameters for i18n]

Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-21 23:15:10 +01:00
Bert Wesarg ff3f01bba9 git-gui: span widgets over the full file output area in the blame view
Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-21 22:28:27 +01:00
Bert Wesarg f9ace9e63d git-gui: use a tristate to control the case mode in the searchbar
The config is now called and can have the three values:
no/yes/smart. yes is the default.

It also resets the case detection in smart mode, when the entry field was
cleared by the use.

Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-21 22:28:23 +01:00
Pat Thoyts 508dee31f3 git-gui: set suitable extended window manager hints.
This patch uses recent Tk attributes support to specify the intended use of new
toplevels by setting the correct EWMH hint. This helps modern window managers
to apply sensible decoration for the tooltip and dialogs.

Signed-off-by: Pat Thoyts <>
2011-10-19 14:26:29 +01:00
Bert Wesarg 80e6667809 git-gui: fix display of path in browser title
Ensure the browser path is shown on the title with a / suffix and escape
any backslashes or newlines in path elements before display.

Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-19 14:13:15 +01:00
Pat Thoyts ae6ec6124b Merge branch 'bw/searching' 2011-10-19 13:35:30 +01:00
Pat Thoyts 8eaf24b93b git-gui: enable the smart case sensitive search only if is true
Signed-off-by: Pat Thoyts <>
2011-10-19 13:29:52 +01:00
Pat Thoyts b66f4f7aa7 git-gui: catch invalid or complete regular expressions and treat as no match.
Signed-off-by: Pat Thoyts <>
2011-10-19 13:22:33 +01:00
Pat Thoyts 3592767276 git-gui: theme the search and line-number entry fields on blame screen
Signed-off-by: Pat Thoyts <>
2011-10-19 12:44:39 +01:00
Pat Thoyts 99665fc582 git-gui: include the number of untracked files to stage when asking the user
Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-18 09:44:10 +01:00
Bert Wesarg bb196e2619 git-gui: new config to control staging of untracked files
The default is the current "ask".

Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-18 09:44:10 +01:00
Bert Wesarg 526aa2b203 git-gui: use "untracked" for files which are not known to git
"untracked" is the right phrase for files new to git. For example
git-status uses this phrase. Also make the question shorter.

Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-18 09:44:10 +01:00
Bert Wesarg b020bbd5a0 git-gui: fix unintended line break in message string
Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-18 09:44:10 +01:00
Bert Wesarg 1159971baa git-gui: add search history to searchbar
Use the up/down keys to browse the history.

Signed-off-by: Bert Wesarg <>
Signed-off-by: Pat Thoyts <>
2011-10-18 09:27:28 +01:00