Commit Graph

422 Commits

Author SHA1 Message Date
Remi Rampin
83da013998 git-gui: Makes chooser set 'gitdir' to the resolved path
If _is_git follows a "gitdir: ..." file link to get to the actual
repository, we want _gitdir to be set to that final path.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Remi Rampin <remirampin@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2015-03-07 12:29:03 +00:00
Remi Rampin
cc6825e194 git-gui: Fixes chooser not accepting gitfiles
Support the case where .git is a platform independent symbolic link
and not a directory. This occurs when --separate-git-dir is used when
creating the local repository to store the .git directory elsewhere.

git-gui does not support such repositories when using the repository
chooser as the test to determine that the chosen directory is a git
repository fails for such repositories.

This commit enables _is_git to read the real location from the
symbolic link file.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Remi Rampin <remirampin@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2015-03-07 12:28:58 +00:00
Michael Lutz
a43c5f51a4 git-gui: add configurable tab size to the diff view
For Tk 8.5 the "wordprocessor" mode allows us to get a bit fancy for merge
diffs and intend the tabs by one to compensate for the additional diff
marker at the line start.

The code is heavily based on how gitk handles tabs.

Signed-off-by: Michael Lutz <michi@icosahedron.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-10-06 10:34:52 +01:00
Pat Thoyts
41a5f0b540 git-gui: align the new recursive checkbox with the radiobuttons.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-06-13 19:38:28 +01:00
Henri GEIST
2202b8b8bc git-gui: Add a 'recursive' checkbox in the clone menu.
Permit to do a 'git clone --recursive' through git-gui.
Add a 'recursive' checkbox in the clone menu which allows
users to clone a repository and all its submodules in one
go (unless the 'update' flag is set to "none" in the
.gitmodules file for a submodule, in that case that
specific submodule is not cloned automatically).

Enable this new option per default, as most users want to
clone all submodules too when cloning the superproject
(This is currently not possible without leaving git gui
or adding a custom tool entry for that).

Signed-off-by: Henri GEIST <geist.henri@laposte.net>
Thanks-to: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-06-13 19:12:52 +01:00
Jens Lehmann
e0db1dd7d4 git-gui: show staged submodules regardless of ignore config
Currently setting submodule.<name>.ignore and/or diff.ignoreSubmodules to
"all" suppresses all output of submodule changes for git-gui. This is
really confusing, as even when the user chooses to record a new commit for
an ignored submodule by adding it manually this change won't show up under
"Staged Changes (Will Commit)".

Fix that by using the '--ignore-submodules=dirty' option for both callers
of "git diff-index --cached" when the underlying git version supports that
option.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-06-13 18:27:33 +01:00
Masanari Iida
73fd416b29 git-gui: correct spelling errors in comments
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-11-15 20:44:08 +00:00
Max Kirillov
e632b3c0d3 git-gui: Add gui.displayuntracked option
When git is used to track only a subset of a directory, or
there is no sure way to divide files to ignore from files to track,
git user have to live with large number of untracked files. These files
present in file list, and should always be scrolled through
to handle real changes. Situation can become even worse, then number
of the untracked files grows above the maxfilesdisplayed limit. In the
case, even staged can be hidden by git-gui.

This change introduces new configuration variable gui.displayuntracked,
which, when set to false, instructs git-gui not to show untracked files
in files list. They can be staged from commandline or other tools (like
IDE of file manager), then they become visible. Default value of the
option is true, which is compatible with current behavior.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-08-27 20:06:42 +01:00
Pat Thoyts
d478056c7d git-gui: show the maxrecentrepo config option in the preferences dialog
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-08-27 20:06:42 +01:00
Pat Thoyts
a86560453b git-gui: added gui.maxrecentrepo to extend the number of remembered repos
The list of recently opened repositories shown when launching git-gui from
outside a repository was hard coded to only show a maximum of 10 items.
This config variable allows the user to override this default.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-08-27 20:06:41 +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ć <rivanvx@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-06-15 23:36:27 +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 <patthoyts@users.sourceforge.net>
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
header.

Acked-by: Tobias Preuss <tobias.preuss@googlemail.com>
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <warren@warrenfalk.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2013-02-22 20:13:21 +00: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 <bbolli@ewanet.ch>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2012-09-17 11:59:05 +01:00
Beat Bolli
9ef750875a git-gui: Fix a loose/lose mistake
Acked-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Beat Bolli <bbolli@ewanet.ch>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2012-09-17 11:53:37 +01: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 <drizzd@aon.at>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2012-01-22 23:16:03 +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 <sschuberth@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-12-09 15:14:32 +00:00
Bert Wesarg
d8d166bf09 git-gui: don't warn for detached head when rebasing
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-11-05 00:39:04 +00:00
Bert Wesarg
f49517a862 git-gui: make config gui.warndetachedcommit a boolean
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <tilman.vogel@web.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <patthoyts@users.sourceforge.net>
2011-11-04 16:16:54 +00:00
Pat Thoyts
9af6413b96 git-gui: support underline style when parsing diff output
Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <kusmabite@gmail.com>
Signed-off-by: Dejan Ribič <dejan.ribic@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 gui.search.case 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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 gui.search.smartcase is true
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <patthoyts@users.sourceforge.net>
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 <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-18 09:27:28 +01:00
Bert Wesarg
e9144d5555 git-gui: add regexp search mode to the searchbar
It's off by default, but can be enabled via the config gui.search.regexp.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-18 09:27:28 +01:00
Bert Wesarg
0a0243d733 git-gui: add smart case search mode in searchbar
Setting config gui.search.smartcase to true, the search mode in the
searchbar (from the blame view) is by default case-insensitive. But
entering an upper case letter into the search field activates the case-
sensitive search mode.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-18 09:27:28 +01:00
Bert Wesarg
843d6597fb git-gui: incremental goto line in blame view
The view jumps now to the given line number after each key press.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-15 23:14:13 +01:00
Bert Wesarg
81a92e5205 git-gui: clear the goto line input when hiding
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-15 23:14:13 +01:00
Bert Wesarg
59252107ac git-gui: only accept numbers in the goto-line input
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-15 23:13:32 +01:00
Bert Wesarg
e0e0a6c64c git-gui: search and linenumber input are mutual exclusive in the blame view
It was possible to open the search input (Ctrl+S) and the goto-line input
(Ctrl+G) at the same time. Prevent this.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-15 09:13:33 +01:00
Heiko Voigt
856c2d75c6 git-gui: deal with unknown files when pressing the "Stage Changed" button
As a shortcut the "Stage Changed" button can be used to stage all current
changes in the worktree which are not set to ignore. Previously unknown
files would be ignored. The user might want to say: "Just save everything
in my worktree". To support this workflow we now ask whether the user also
wants to stage the unknown files if there are some present.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-06 23:20:16 +01:00
Pat Thoyts
29776c75d0 git-gui: drop the 'n' and 'Shift-n' bindings from the last patch.
The 'n' binding should cause the next match to be selected but results
in the search field gaining focus and additional 'n's being appended.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-07-19 15:33:34 +01:00
David Fries
af9a4625fa git-gui: Add keyboard shortcuts for search and goto commands in blame view.
Use forward-slash or Control-S to bring up the search dialog.
In the blame view, Enter or 'n' jump to the next selected region while
Shift-Enter or Shift-n will jump to the previous selected region.
Within the search control, hitting Enter will now jump to the next matching
region.

Signed-off-by: David Fries <David@Fries.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-07-19 15:31:29 +01:00
David Fries
9a483e5c09 git-gui: Enable jumping to a specific line number in blame view.
This patch adds a goto control similar to the search control currently
available. The goto control permits the user to specify a line number to
jump to.
When in blame, Control-G is bound to display this control.

Signed-off-by: David Fries <David@Fries.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-07-19 15:31:24 +01:00
Pat Thoyts
768e300a50 Fix tooltip display with multiple monitors on windows.
On Windows the position of a window may be negative on a monitor to the
left of the primary display. A plus sign is used as the separator between
the width and height and the positional parts of the geometry so always
include the plus sign even for negative positions on this platform.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-07-11 13:55:38 +01:00
Heiko Voigt
e34789cc8b git-gui: warn when trying to commit on a detached head
The commandline is already warning when checking out a detached head.
Since the only thing thats potentially dangerous is to create commits
on a detached head lets warn in case the user is about to do that.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-05-20 22:49:15 +01:00