gitweb.git
gitk: l10n: Update Catalan translationAlex Henrie Tue, 6 Oct 2015 04:26:12 +0000 (22:26 -0600)

gitk: l10n: Update Catalan translation

The gitk included in git 2.6.0 crashes if run from a Catalan locale.
I'm hoping that a translation update will fix this.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add missing acceleratorsBeat Bolli Wed, 30 Sep 2015 19:50:11 +0000 (21:50 +0200)

gitk: Add missing accelerators

In d99b4b0de27a ("gitk: Accelerators for the main menu", 2015-09-09),
accelerators were added to allow efficient keyboard navigation. One
instance of the strings "Edit view..." and "Delete view" were left
without the ampersand.

Add the missing ampersand characters to unbreak our international
users.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Accelerators for the main menuGiuseppe Bilotta Wed, 9 Sep 2015 13:20:53 +0000 (15:20 +0200)

gitk: Accelerators for the main menu

This allows fast, keyboard-only usage of the menu (e.g. Alt+V, N to open a
new view).

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Adjust the menu line numbers to compensate for... Beat Bolli Mon, 7 Sep 2015 23:16:37 +0000 (01:16 +0200)

gitk: Adjust the menu line numbers to compensate for the new entry

Commit d835dbb9 ("gitk: Add a "Copy commit summary" command",
2015-08-13) in the upstream gitk repo added a new context menu entry.
Therefore, the line numbers of the entries below the new one need to be
adjusted when their text or state is changed.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add a "Copy commit summary" commandBeat Bolli Sat, 18 Jul 2015 11:15:39 +0000 (13:15 +0200)

gitk: Add a "Copy commit summary" command

When referring to earlier commits in commit messages or other text, one
of the established formats is

<abbrev-sha> ("<summary>", <author-date>)

Add a "Copy commit summary" command to the context menu that puts this
text for the currently selected commit on the clipboard. This makes it
easy for our users to create well-formatted commit references.

The <abbrev-sha> is produced with the %h format specifier to make it
unique. Its length can be controlled with the gitk preference
"Auto-select SHA1 (length)", or, if this preference is set to its
default value (40), with the Git config setting core.abbrev.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update Bulgarian translation (307t)Alexander Shopov Sun, 28 Jun 2015 20:28:13 +0000 (23:28 +0300)

gitk: Update Bulgarian translation (307t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update .po filesPaul Mackerras Sun, 17 May 2015 04:33:26 +0000 (14:33 +1000)

gitk: Update .po files

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update Bulgarian translation (304t)Alexander Shopov Tue, 7 Apr 2015 15:33:58 +0000 (18:33 +0300)

gitk: Update Bulgarian translation (304t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Use translated version of "Command line" in getco... Marc Branchaud Tue, 7 Apr 2015 15:53:37 +0000 (11:53 -0400)

gitk: Use translated version of "Command line" in getcommitlines

This is needed for getcommitlines to work properly when a language
translation is being used.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Make it easier to go quickly to a specific commitIsmael Luceno Wed, 15 Apr 2015 16:18:17 +0000 (13:18 -0300)

gitk: Make it easier to go quickly to a specific commit

Binds "g" to focus and clear the sha1 entry box.

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Show the current view's name in the window titleMarc Branchaud Tue, 7 Apr 2015 15:51:51 +0000 (11:51 -0400)

gitk: Show the current view's name in the window title

If the current view is the "Command line" view, show the command line
arguments instead of the view name.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add mouse right-click options to copy path and... Michael Rappazzo Fri, 8 May 2015 02:29:20 +0000 (22:29 -0400)

gitk: Add mouse right-click options to copy path and branch name

This adds menu entries to two of the right-click menus:
- 'Copy path' in the file list
- 'Copy branch name' on a branch in the commit list

Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Remove mc parameter from proc show_errorAlex Henrie Mon, 11 May 2015 19:26:41 +0000 (13:26 -0600)

gitk: Remove mc parameter from proc show_error

This is a better fix for 8d849957d81fc0480a52570d66cc3c2a688ecb1b.

This new fix makes the strings "Sorry, gitk cannot run..." and "OK"
translatable and the string "mc" not translatable. It will take effect
the next time `make update-po` is run.

msgcat is now imported before the Tcl/Tk version check so that the mc
function is available even if the version check fails. This should not
be a problem because msgcat and ::msgcat::mc were officially added in
Tcl 8.1 (released April 29, 1999) and we are not trying to support
versions of Tcl older than that.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix error when changing colors after closing... Paul Mackerras Sun, 3 May 2015 05:11:29 +0000 (15:11 +1000)

gitk: Fix error when changing colors after closing "List references" window

This fixes an error that manifests itself if the user opens the
"List references" window and the closes it, and subsequently opens
the Preferences window and changes one of the colors. When the
user clicks OK, and error popup appears with the message:

Error: invalid command name ".showrefs.list"

This is because .showrefs.list was added to the list of windows to
be notified on foreground/background color changes, but the window
no longer exists. We fix the bug by checking whether the window
exists before trying to change its colors. As an optimization, we
also avoid adding the .showrefs.list window to the list a second
time.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Replace catch {unset foo} with unset -nocomplain fooPaul Mackerras Sat, 2 May 2015 10:53:36 +0000 (20:53 +1000)

gitk: Replace catch {unset foo} with unset -nocomplain foo

This generates better bytecode in Tcl 8.6 according to
http://wiki.tcl.tk/1506.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Rearrange window title to be more conventionalMarc Branchaud Mon, 23 Mar 2015 14:18:16 +0000 (10:18 -0400)

gitk: Rearrange window title to be more conventional

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: sv.po: Update Swedish translation (305t0f0u)Peter Krefting Fri, 27 Mar 2015 09:32:36 +0000 (10:32 +0100)

gitk: sv.po: Update Swedish translation (305t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix bad English grammar "Matches none Commit... Alex Henrie Thu, 2 Apr 2015 21:05:06 +0000 (15:05 -0600)

gitk: Fix bad English grammar "Matches none Commit Info"

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update .po filesPaul Mackerras Sun, 15 Mar 2015 06:25:02 +0000 (17:25 +1100)

gitk: Update .po files

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: l10n: Add Catalan translationAlex Henrie Mon, 2 Feb 2015 05:53:32 +0000 (22:53 -0700)

gitk: l10n: Add Catalan translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix typo in Russian translation0xAX Fri, 14 Nov 2014 11:05:28 +0000 (17:05 +0600)

gitk: Fix typo in Russian translation

Signed-off-by: 0xAX <kuleshovmail@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Remove tcl-format flag from a message that should... Alex Henrie Thu, 22 Jan 2015 08:19:39 +0000 (01:19 -0700)

gitk: Remove tcl-format flag from a message that shouldn't have it

xgettext sees "% o" and interprets it as a placeholder for an octal
number preceded by a space. However, in this case it's not actually a
placeholder, and most translations will replace the "% o" sequence with
something else. Removing the tcl-format flag from this string prevents
tools like Poedit from freaking out when "% o" doesn't appear in the
translated string.

The corrected flag will appear in each translation's po file the next time
the translation is updated with `make update-po`.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Pass --invert-grep option down to "git log"Christoph Junghans Tue, 13 Jan 2015 01:33:32 +0000 (18:33 -0700)

gitk: Pass --invert-grep option down to "git log"

"git log --grep=<string>" shows only commits with messages that
match the given string, but sometimes it is useful to be able to
show only commits that do *not* have certain messages (e.g. "show
me ones that are not FIXUP commits").

Now the underlying "git log" learned the "--invert-grep" option.
The option syntactically behaves similar to "--all-match" that
requires that all of the grep strings to match and semantically
behaves the opposite---it requires that none of the grep strings to
match.

Teach "gitk" to allow users to pass it down to underlying "git log"
command by adding it to the known_view_options array.

Signed-off-by: Christoph Junghans <ottxor@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Synchronize config file writesMax Kirillov Wed, 4 Mar 2015 03:58:18 +0000 (05:58 +0200)

gitk: Synchronize config file writes

If several gitk instances are closed simultaneously, the savestuff
procedure can run at the same time, resulting in a conflict which may
cause losing of some of the instance's changes, failing the saving
operation or even corrupting the configuration file. This can happen,
for example, at user session closing, or at group closing of all
instances of an application which is possible in some desktop
environments.

To avoid this, make sure that only one saving operation is in
progress. It is guarded by existence of the $config_file_tmp
file. Creating the file and moving it to $config_file are both atomic
operations, so it should be reliable.

Reading does not need to be syncronized, because moving is an atomic
operation, and the $config_file always refers to a full and correct file.
But, if there is a stale $config_file_tmp file, report it at gitk start.
If such file is detected when saving, just report it abort the save, as
for other errors in saving.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Report errors in saving config fileMax Kirillov Wed, 4 Mar 2015 03:58:17 +0000 (05:58 +0200)

gitk: Report errors in saving config file

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Only write changed configuration variablesMax Kirillov Wed, 4 Mar 2015 03:58:16 +0000 (05:58 +0200)

gitk: Only write changed configuration variables

When gitk contains some changed parameter, and there is an existing
instance of gitk where the parameter is still old, it is reverted to
that old value when that instance exits.

Instead, store a parameter in config only if it has been modified in
the exiting instance. Otherwise, preserve the value which currently is in
file. This allows editing the configuration when several instances are
running, without rollback of the modification if some other
instance where the configuration was not edited is closed last.

For scalar variables, use trace(3tcl) to detect their change. Since
`trace` can send bogus events, doublecheck if the value has really
been changed, but once it is marked as changed, do not reset it back
to unchanged ever, because if user has restored the original value,
it's the decision which should be stored as well as modified value.

Treat view list especially: instead of rewriting the whole list, merge
individual views. Place old and updated views in their old places,
add new ones to the end of list. Collect modified views explicitly, in
newviewok{} and delview{}.

Do not merge geometry values. They are almost always changing because
user moves and resises windows, and there is no way to find which one of
the geometries is most desired. Just overwrite them unconditionally,
like earlier.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Enable mouse horizontal scrolling in diff paneGabriele Mazzotta Sat, 15 Nov 2014 14:05:06 +0000 (15:05 +0100)

gitk: Enable mouse horizontal scrolling in diff pane

Currently it's required to hold Shift and scroll up and down to move
horizontally. Listen to Button-6 and Button-7 events too to make
horizontal scrolling handier with touchpads and some mice.

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Default wrcomcmd to use --pretty=emailChris Packham Sun, 2 Nov 2014 08:37:50 +0000 (21:37 +1300)

gitk: Default wrcomcmd to use --pretty=email

This makes the "Write commit to file" context menu option generate a
file that is consumable by 'git am'.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Remove boilerplate for configuration variablesMax Kirillov Sun, 14 Sep 2014 20:35:57 +0000 (23:35 +0300)

gitk: Remove boilerplate for configuration variables

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Show detached HEAD if --all is specifiedMax Kirillov Tue, 9 Sep 2014 07:29:16 +0000 (10:29 +0300)

gitk: Show detached HEAD if --all is specified

If HEAD is detached, 'gitk --all' does not show it. This is inconvenient
for frontend program, and for example git log does show the detached HEAD.

gitk uses git rev-parse to find a list of branches to show.
Apparently, the command does not include detached HEAD to output if
--all argument is specified. This has been discussed in [1] and stated
as expected behavior. So rev-parse's parameters should be tuned in gitk.

[1] http://thread.gmane.org/gmane.comp.version-control.git/255996

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Do not depend on Cygwin's "kill" command on WindowsSebastian Schuberth Thu, 23 Oct 2014 19:30:54 +0000 (21:30 +0200)

gitk: Do not depend on Cygwin's "kill" command on Windows

Windows does not necessarily mean Cygwin, it could also be MSYS. The
latter ships with a version of "kill" that does not understand "-f".
In msysgit this was addressed by shipping Cygwin's version of kill.

Properly fix this by using the stock Windows "taskkill" command instead,
which is available since Windows XP Professional.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Updated Bulgarian translation (302t,0f,0u)Alexander Shopov Sun, 3 Aug 2014 12:36:43 +0000 (15:36 +0300)

gitk: Updated Bulgarian translation (302t,0f,0u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add keybinding to switch to parent commitMax Kirillov Tue, 8 Jul 2014 20:45:35 +0000 (23:45 +0300)

gitk: Add keybinding to switch to parent commit

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add visiblerefs option, which lists always-shown... Max Kirillov Tue, 24 Jun 2014 05:19:44 +0000 (08:19 +0300)

gitk: Add visiblerefs option, which lists always-shown branches

When many branches contain a commit, the branches used to be shown in
the form "A, B and many more", where A, B can be master of current
HEAD. But there are more which might be interesting to always know about.
For example, "origin/master".

The new option, visiblerefs, is stored in ~/.gitk. It contains a list
of references which are always shown before "and many more" if they
contain the commit. By default it is `{"master"}', which is compatible
with previous behavior.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Catch mkdtemp errorsDavid Aguilar Thu, 19 Jun 2014 02:53:14 +0000 (19:53 -0700)

gitk: Catch mkdtemp errors

105b5d3f ("gitk: Use mktemp -d to avoid predictable temporary
directories") introduced a dependency on mkdtemp, which is not
available on Windows.

Use the original temporary directory behavior when mkdtemp fails.
This makes the code use mkdtemp when available and gracefully
fallback to the existing behavior when it is not available.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Use mktemp -d to avoid predictable temporary... David Aguilar Fri, 13 Jun 2014 21:43:48 +0000 (14:43 -0700)

gitk: Use mktemp -d to avoid predictable temporary directories

gitk uses a predictable ".gitk-tmp.$PID" pattern when generating
a temporary directory.

Use "mktemp -d .gitk-tmp.XXXXXX" to harden gitk against someone
seeding /tmp with files matching the pid pattern.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Honor TMPDIR when viewing external diffsDavid Aguilar Fri, 13 Jun 2014 21:13:37 +0000 (14:13 -0700)

gitk: Honor TMPDIR when viewing external diffs

gitk fails to show diffs when browsing a read-only repository.
This is due to gitk's assumption that the current directory is always
writable.

Teach gitk to honor either the GITK_TMPDIR or TMPDIR environment
variables. This allows users to override the default location
used when writing temporary files.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Show staged submodules regardless of ignore configJens Lehmann Tue, 8 Apr 2014 19:36:08 +0000 (21:36 +0200)

gitk: 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 gitk. 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
"Local changes checked in to index but not committed".

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: Paul Mackerras <paulus@samba.org>

gitk: Allow displaying time zones from author and commi... Anders Kaseorg Mon, 12 May 2014 11:25:58 +0000 (07:25 -0400)

gitk: Allow displaying time zones from author and commit dates timestamps

Now gitk can be configured to display author and commit dates in their
original timezone, by putting %z into datetimeformat in ~/.gitk.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Switch to patch mode when searching for line... Max Kirillov Sat, 5 Apr 2014 20:38:50 +0000 (23:38 +0300)

gitk: Switch to patch mode when searching for line origin

If the "Show origin of this line" is started from tree mode,
it still shows the result in tree mode, which I suppose not
what user expects to see.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Replace SHA1 entry field on keyboard pasteIlya Bobyr Thu, 20 Mar 2014 08:58:51 +0000 (01:58 -0700)

gitk: Replace SHA1 entry field on keyboard paste

We already replace old SHA with the clipboard content for the mouse
paste event. It seems reasonable to do the same when pasting from
keyboard.

Signed-off-by: Ilya Bobyr <ilya.bobyr@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Merge branch 'new' of https://github.com/vnwildma... Paul Mackerras Fri, 21 Feb 2014 01:08:41 +0000 (12:08 +1100)

gitk: Merge branch 'new' of https://github.com/vnwildman/gitk

to get Vietnamese translations for gitk.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Indent word-wrapped lines in commit display headerPaul Mackerras Thu, 23 Jan 2014 11:06:22 +0000 (22:06 +1100)

gitk: Indent word-wrapped lines in commit display header

In the cases where the lines starting with Precedes:, Follows: and
Branches: in the commit display are long enough to be word-wrapped,
this adds a 1cm margin on the left of the wrapped lines, to make
the display more readable. Suggested by Stephen Rothwell.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Comply with XDG base directory specificationAstril Hayato Tue, 21 Jan 2014 19:10:16 +0000 (19:10 +0000)

gitk: Comply with XDG base directory specification

Write the gitk config data to $XDG_CONFIG_HOME/git/gitk ($HOME/.config/git/gitk
by default) in line with the XDG specification. This makes it consistent with
git which also follows the spec.

If $HOME/.gitk already exists use that for backward compatibility, so only new
installations are affected.

Signed-off-by: Astril Hayato <astrilhayato@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Replace "next" and "prev" buttons with down and... Marc Branchaud Wed, 18 Dec 2013 16:04:13 +0000 (11:04 -0500)

gitk: Replace "next" and "prev" buttons with down and up arrows

Users often find that "next" and "prev" do the opposite of what they
expect. For example, "next" moves to the next match down the list, but
that is almost always backwards in time. Replacing the text with arrows
makes it clear where the buttons will take the user.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: chmod +x po2msg.shJonathan Nieder Mon, 25 Nov 2013 21:00:10 +0000 (13:00 -0800)

gitk: chmod +x po2msg.sh

The Makefile only runs it using tclsh, but because the fallback po2msg
script has the usual tcl preamble starting with #!/bin/sh it can also
be run directly.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update copyright datesPaul Mackerras Tue, 21 Jan 2014 11:02:27 +0000 (22:02 +1100)

gitk: Update copyright dates

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add Bulgarian translation (304t)Alexander Shopov Wed, 15 Jan 2014 11:27:29 +0000 (13:27 +0200)

gitk: Add Bulgarian translation (304t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix mistypeMax Kirillov Sat, 18 Jan 2014 12:58:51 +0000 (14:58 +0200)

gitk: Fix mistype

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

l10n: Init Vietnamese translationTrần Ngọc Quân Sat, 14 Dec 2013 07:43:04 +0000 (14:43 +0700)

l10n: Init Vietnamese translation

Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>

gitk: Recognize -L optionThomas Rast Sat, 16 Nov 2013 17:37:44 +0000 (18:37 +0100)

gitk: Recognize -L option

This gives line-log support to gitk, by exploiting the new support for
processing and showing "inline" diffs straight from the git-log
output.

Note that we 'set allknown 0', which is a bit counterintuitive since
this is a "known" option. But that flag prevents gitk from thinking
it can optimize the view by running rev-list to see the topology; in
the -L case that doesn't work.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Support showing the gathered inline diffsThomas Rast Sat, 16 Nov 2013 17:37:43 +0000 (18:37 +0100)

gitk: Support showing the gathered inline diffs

The previous commit split the diffs into a separate field. Now we
actually want to show them.

To that end we use the stored diff, and

- process it once to build a fake "tree diff", i.e., a list of all
changed files;

- feed it through parseblobdiffline to actually format it into the
$ctext field, like the existing diff machinery would.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Split out diff part in $commitinfoThomas Rast Sat, 16 Nov 2013 17:37:42 +0000 (18:37 +0100)

gitk: Split out diff part in $commitinfo

So far we just parsed everything after the headers into the "comment"
bit of $commitinfo, including notes and -- if you gave weird options
-- the diff.

Split out the diff, if any, into a separate field. It's easy to
recognize, since it always starts with /^diff/ and is preceded by an
empty line.

We take care to snip away said empty line. The display code already
properly spaces the end of the message from the first diff, and
leaving another empty line at the end looks ugly.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Refactor per-line part of getblobdiffline and... Thomas Rast Sat, 16 Nov 2013 17:37:41 +0000 (18:37 +0100)

gitk: Refactor per-line part of getblobdiffline and its support

For later use with data sources other than a pipe, refactor the big
worker part of getblobdiffline to a separate function
parseblobdiffline. Also refactor its initialization and wrap-up to
separate routines.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Support -G option from the command lineThomas Rast Sat, 16 Nov 2013 17:37:40 +0000 (18:37 +0100)

gitk: Support -G option from the command line

The -G option's usage is exactly analogous to that of -S, so
supporting it is easy.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Tag display improvementsPaul Mackerras Wed, 2 Jan 2013 23:10:31 +0000 (10:10 +1100)

gitk: Tag display improvements

When a commit has many tags, the tag icons in the graph display can
easily become so wide as to push the commit message off the right-hand
edge of the graph display pane. This changes the display so that if
there are more than 3 tags or they would take up more than a quarter
of the width of the pane, we instead display a single tag icon with
a legend inside it like "4 tags...". If the user clicks on the tag
icon, gitk then displays all the tags in the diff display pane.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update Swedish translation (304t)Peter Krefting Thu, 16 May 2013 07:14:35 +0000 (08:14 +0100)

gitk: Update Swedish translation (304t)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: On OSX, bring the gitk window to frontTair Sabirgaliev Wed, 24 Apr 2013 09:48:27 +0000 (15:48 +0600)

gitk: On OSX, bring the gitk window to front

On OSX, Tcl/Tk application windows are created behind all
the applications down the stack of windows. This is very
annoying, because once a gitk window appears, it's the
downmost window and switching to it is pain.

The patch is: if we are on OSX, use osascript to
bring the current Wish process window to front.

Signed-off-by: Tair Sabirgaliev <tair.sabirgaliev@gmail.com>
Thanks-to: Stefan Haller <lists@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add support for -G'regex' pickaxe variantMartin Langhoff Thu, 14 Jun 2012 18:34:11 +0000 (20:34 +0200)

gitk: Add support for -G'regex' pickaxe variant

git log -G'regex' is a very useful alternative to the classic
pickaxe. Minimal patch to make it usable from gitk.

[zj: reword message]
[paulus@samba.org: reword droplist item]
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add menu item for reverting commitsKnut Franke Sat, 27 Apr 2013 14:36:13 +0000 (16:36 +0200)

gitk: Add menu item for reverting commits

Sometimes it's helpful (at least psychologically) to have this feature
easily accessible. Code borrows heavily from cherrypick.

Signed-off-by: Knut Franke <Knut.Franke@gmx.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Simplify file filteringFelipe Contreras Sat, 27 Apr 2013 22:01:39 +0000 (17:01 -0500)

gitk: Simplify file filtering

git diff is perfectly able to do this with '-- files', no need for
manual filtering. This makes gettreediffs consistent with getblobdiffs.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Display the date of a tag in a human-friendly wayAnand Kumria Mon, 29 Apr 2013 05:20:48 +0000 (06:20 +0100)

gitk: Display the date of a tag in a human-friendly way

By selecting a tag within gitk you can display information about it.
This information is output by using the command

'git cat-file tag <tagid>'

This outputs the *raw* information from the tag, amongst which is the
time - in seconds since the epoch. As useful as that value is, I find it
a lot easier to read and process time which it is something like:

"Mon Dec 31 14:26:11 2012 -0800"

This change will modify the display of tags in gitk like so:

@@ -1,7 +1,7 @@
object 5d417842efeafb6e109db7574196901c4e95d273
type commit
tag v1.8.1
-tagger Junio C Hamano <gitster@pobox.com> 1356992771 -0800
+tagger Junio C Hamano <gitster@pobox.com> Mon Dec 31 14:26:11 2012 -0800

Git 1.8.1
-----BEGIN PGP SIGNATURE-----

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Improve behaviour of drop-down listsPaul Mackerras Sat, 11 May 2013 07:08:41 +0000 (17:08 +1000)

gitk: Improve behaviour of drop-down lists

The drop-down lists used for things like the criteria for finding
commits (containing/touching paths/etc.) use a combobox if we are
using the ttk widgets. By default the combobox exports its value
as the selection when it is changed, which is unnecessary, and sometimes
the combobox wouldn't release the selection, which is annoying.

To fix this, we make these comboboxes not export their selection,
and also clear their selection whenever they are changed. This makes
them more like a simple selection of alternatives, improving the look
and feel of gitk.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Move hard-coded colors to .gitkGauthier Östervall Wed, 27 Mar 2013 13:40:51 +0000 (14:40 +0100)

gitk: Move hard-coded colors to .gitk

The Preferences dialog gives control of the colors of some elements of
the gitk user interface, but many are hard-coded in the gitk script.
In order to allow these to be customized through the gitk config
file, these other colors are stored in variables which can be set
in the config file, thus providing a way for color schemes to be stored
and shared.

For win32, this makes the default foreground color that of window text
rather than button text.

Signed-off-by: Gauthier Östervall <gauthier@ostervall.se>
[paulus@samba.org: Reworded commit message to be clearer,
changed filesepfgcolor to black]
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Ignore gitk-wish buildproductChristian Couder Wed, 23 Jan 2013 20:00:35 +0000 (12:00 -0800)

gitk: Ignore gitk-wish buildproduct

gitk, when bound into the git.git project tree, used to live at the
root level, but in 62ba514 (Move gitk to its own subdirectory,
2007-11-17) it was moved to a subdirectory. The code used to track
changes to TCLTK_PATH (which should cause gitk to be rebuilt to
point at the new interpreter) was left in the main Makefile instead
of being moved to the new Makefile that was created for the gitk
project.

Also add .gitignore file to list build artifacts for the gitk
project.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Display important heads even when there are manyPaul Mackerras Wed, 2 Jan 2013 04:25:29 +0000 (15:25 +1100)

gitk: Display important heads even when there are many

When there are more than $maxrefs descendant heads to display in the
Branches field of the commit display, we currently just display "many",
which is not very informative. To make the display more informative,
we now look for "master" and whichever head is currently checked out,
and display them even if there are too many heads to display them all.
The display then looks like "Branches: master and many more (33)" for
instance.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Improve display of list of nearby tags and headsPaul Mackerras Tue, 1 Jan 2013 12:08:12 +0000 (23:08 +1100)

gitk: Improve display of list of nearby tags and heads

This provides a control in the preferences pane for the limit on
how many tags or heads are displayed with the commit details under
the Branch(es), Precedes and Follows headings. This limit is now
saved in ~/.gitk so that changes are persistent.

This also applies word-wrapping to the list of tags or heads under
the Branch, Precedes and Follows headings, so that long lists are
more readable.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix display of branch names on some commitsPaul Mackerras Tue, 1 Jan 2013 05:51:03 +0000 (16:51 +1100)

gitk: Fix display of branch names on some commits

Sometimes the code that divides commits up into arcs creates two
successive arcs, but the commit between them (the commit at the end
of the first arc and the beginning of the second arc) has only one
parent and one child. If that commit is also the head of one or more
branches, those branches get omitted from the "Branches" field in the
commit display.

The omission occurs because the commit gets erroneously identified as
a commit which is part-way along an arc in [descheads]. This fixes it
by changing the test to look at the arcouts array, which only contains
elements for the commits at the start or end of an arc.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update Swedish translation (296t)Peter Krefting Wed, 3 Oct 2012 07:16:03 +0000 (08:16 +0100)

gitk: Update Swedish translation (296t)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: When searching, only highlight files when in... Stefan Haller Thu, 4 Oct 2012 20:50:17 +0000 (22:50 +0200)

gitk: When searching, only highlight files when in Patch mode

This fixes another regression that was introduced in b967135 ("gitk:
Synchronize highlighting in file view when scrolling diff"): when
searching for a string in tree mode, jumping to the next search hit
would highlight the "Comments" entry in the file list.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix error message when clicking on a connecting... Stefan Haller Thu, 4 Oct 2012 20:50:16 +0000 (22:50 +0200)

gitk: Fix error message when clicking on a connecting line

When clicking on the line that connects two commit nodes, gitk
would bring up an error dialog saying "can't read "cflist_top":
no such variable".

This fixes a regression that was introduced with b967135 ("gitk:
Synchronize highlighting in file view when scrolling diff").

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix crash when not using themed widgetsMarcus Karlsson Sun, 7 Oct 2012 21:21:14 +0000 (23:21 +0200)

gitk: Fix crash when not using themed widgets

When configured not to use themed widgets gitk may crash on launch with
a message that says that the image "bm-left disabled bm-left-gray"
doesn't exist. This happens when the left and right arrow buttons are
created.

The crash can be avoided by configuring the buttons differently
depending on whether or not themed widgets are used. If themed widgets
are not used then only set the images to bm-left and bm-right
respectively, and keep the old behavior when themed widgets are used.

The previous behaviour was added in f062e50f to work around a bug in Tk
on OS X where the disabled state did not display properly. The buttons
may still not display correctly, however the workaround added in
f062e50f will still apply if gitk is used with themed widgets.

Make gitk not crash on launch when not using themed widgets.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Use bindshiftfunctionkey to bind Shift-F5Andrew Wong Tue, 2 Oct 2012 15:04:45 +0000 (11:04 -0400)

gitk: Use bindshiftfunctionkey to bind Shift-F5

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Refactor code for binding modified function keysAndrew Wong Tue, 2 Oct 2012 15:04:44 +0000 (11:04 -0400)

gitk: Refactor code for binding modified function keys

The function includes a workaround for systems where F* keys are mapped
to XF86_Switch_VT_* when modifiers are used.

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Work around empty back and forward images when... Stefan Haller Sat, 22 Sep 2012 07:46:48 +0000 (09:46 +0200)

gitk: Work around empty back and forward images when buttons are disabled

On Mac, the back and forward buttons show an empty rectange instead of
a grayed-out arrow when they are disabled. The reason is a Tk bug on Mac
that causes disabled images not to draw correctly (not to draw at all,
that is); see
<https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.tcl/V-nW1JBq0eU>.

To work around this, we explicitly provide gray images for the disabled
state; I think this looks better than the default stipple effect that you
get on Windows as well, but that may be a matter of taste.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Highlight first search result immediately on... Stefan Haller Sat, 22 Sep 2012 07:40:25 +0000 (09:40 +0200)

gitk: Highlight first search result immediately on incremental search

When typing in the "Search" field, select the current search result (so
that it gets highlighted in orange). This makes it easier to understand
what will happen if you then type Ctrl-S.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Highlight current search hit in orangeStefan Haller Sat, 22 Sep 2012 07:40:24 +0000 (09:40 +0200)

gitk: Highlight current search hit in orange

When searching for text in the diff, and there are multiple occurrences
of the search string, the current one is highlighted in orange, and the
other ones in yellow. This makes it much easier to understand what happens
when you then click the Search button or hit Ctrl-S repeatedly.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Synchronize highlighting in file view when scroll... Stefan Haller Wed, 19 Sep 2012 18:17:27 +0000 (20:17 +0200)

gitk: Synchronize highlighting in file view when scrolling diff

Whenever the diff pane scrolls, highlight the corresponding file in the
file list on the right. For a large commit with many files and long
per-file diffs, this makes it easier to keep track of what you're looking
at.

This allows simplifying the prevfile and nextfile functions, because
all they have to do is scroll the diff pane.

In some situations we want to suppress this mechanism, for example when
clicking on a file in the file list to select it, or when searching in the
diff, in which case we want to highlight based on the current search hit
and not the top line visible. In these cases it's not sufficient to set
a "suppress" flag before scrolling and reset it afterwards, because the
scrolltext notification is sent deferred from a timer or some such; so we
need to remember the scroll position for which we want to suppress the
auto-highlighting until the next call to scrolltext; a bit ugly, but does
the job.

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Merge branch 'da/gitk-reload-tag-contents' of git:... Paul Mackerras Wed, 12 Sep 2012 12:34:24 +0000 (22:34 +1000)

Merge branch 'da/gitk-reload-tag-contents' of git://github.com/gitster/git
to get two commits from David Aguilar.

gitk: Rename 'tagcontents' to 'cached_tagcontent'David Aguilar Sat, 8 Sep 2012 19:53:16 +0000 (12:53 -0700)

gitk: Rename 'tagcontents' to 'cached_tagcontent'

Name the 'tagcontents' variable similarly to the rest of the
variables cleared in the changedrefs() function.

This makes the naming consistent and provides a hint that it
should be cleared when reloading gitk's cache.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Teach "Reread references" to reload tagsDavid Aguilar Sat, 8 Sep 2012 19:03:13 +0000 (12:03 -0700)

gitk: Teach "Reread references" to reload tags

Tag contents, once read, are forever cached in memory.
This makes gitk unable to notice when tag contents change.

Allow users to cause a reload of the tag contents by using
the "File->Reread references" action.

Reported-by: Tim McCormack <cortex@brainonfire.net>
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Fix GIT_TRACE issuesAske Olsson Thu, 10 May 2012 10:13:43 +0000 (12:13 +0200)

gitk: Fix GIT_TRACE issues

Check if GIT_TRACE env var is set and unset it if it is.

If the environment var GIT_TRACE=1 exists gitk will fail when trying
to find gitdir:
$ git rev-parse --git-dir
trace: built-in: git 'rev-parse' '--git-dir'
.git

Other git commands will also show debug output hence not work as
intended.

Signed-off-by: Aske Olsson <askeolsson@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Avoid Meta1-F5Felipe Contreras Sat, 7 Apr 2012 00:29:38 +0000 (03:29 +0300)

gitk: Avoid Meta1-F5

Meta1-F5 is commonly mapped by window managers and what not.
Use Shift-F5 instead.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: fix setting font display with new tabbed dialog... Pat Thoyts Sun, 1 Apr 2012 22:00:52 +0000 (23:00 +0100)

gitk: fix setting font display with new tabbed dialog layout.

The changes to the dialog window tree broke the preview of the selected
font on the button. This corrects that issue.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: fix tabbed preferences construction when using... Pat Thoyts Sun, 1 Apr 2012 22:00:51 +0000 (23:00 +0100)

gitk: fix tabbed preferences construction when using tcl 8.4

In 8.5 the incr command creates the target variable if it does not exist
but in 8.4 using incr on a non-existing variable raises an error. Ensure
we have created our counter variable when creating the tabbed dialog for
non-themed preferences.

Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Teach gitk to respect log.showrootMarcus Karlsson Tue, 4 Oct 2011 20:08:13 +0000 (22:08 +0200)

gitk: Teach gitk to respect log.showroot

In early days, all projects managed by git (except for git itself) had the
product of a fairly mature development history in their first commit, and
it was deemed unnecessary clutter to show additions of these thousands of
paths as a patch.

"git log" learned to show the patch for the initial commit without requiring
--root command line option at 0f03ca9 (config option log.showroot to show
the diff of root commits, 2006-11-23).

Teach gitk to respect log.showroot.

[paulus@samba.org: Cleaned up the Tcl a bit, use --bool on the
git config call]

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add menu items for comparing a commit with the... Paul Mackerras Fri, 23 Mar 2012 11:07:27 +0000 (22:07 +1100)

gitk: Add menu items for comparing a commit with the marked commit

Sometimes one wants to see the different between two commits that are
a long distance apart in the graph display. This is difficult to do
with the "Diff this -> selected" and "Diff selected -> this" menu
items because the need to maintain the selection means that one can't
use the find facilities or the reference list window to navigate from
one to the other.

This provides an alternative using the mark. Having found one commit,
one marks it with the "Mark this commit" menu item, then navigates to
the other commit and uses the new "Diff this -> marked commit" and/or
"Diff marked commit -> this" menu items.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Speed up resolution of short SHA1 idsPaul Mackerras Mon, 19 Mar 2012 00:21:08 +0000 (11:21 +1100)

gitk: Speed up resolution of short SHA1 ids

On large repositories such as the Linux kernel, it can take quite a
noticeable time (several seconds) for gitk to resolve short SHA1 IDs
to their long form. This speeds up the process by maintaining lists
of IDs indexed by the first 4 characters of the SHA1 ID, speeding up
the search by a factor of 65536 on large repositories.

Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Use symbolic font names "sans" and "monospace... Jonathan Nieder Thu, 8 Mar 2012 12:30:11 +0000 (06:30 -0600)

gitk: Use symbolic font names "sans" and "monospace" when available

The following only concerns systems using X and the client-side font
rendering framework from freedesktop.org. Windows and Mac OS X are
not affected.

Starting with version 8.5, Tk uses freetype and fontconfig by default
to render fonts on platforms that support it. Gitk currently defaults
to the font Helvetica for the interface and Courier for diffs, and
both unfortunately look rather bad on screen in the default
configuration on many Linux distros with anti-aliasing and poor
hinting.

It is better to default to "sans" and "monospace", which are mapped by
fontconfig to some appropriate font of the sysadmin and user's
choosing (typically Bitstream Vera Sans and Mono). The result looks
more sensible and it makes gitk feel like a well-behaved software
citizen since its fonts match other native apps.

This patch does not change the appearance of gitk for users that have
already run it, since gitk uses the remembered UI and diff font names
from ~/.gitk.

Requested-by: Michael Biebl <biebl@debian.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Skip over AUTHOR/COMMIT_DATE when searching all... Frédéric Brière Sun, 14 Mar 2010 22:59:09 +0000 (18:59 -0400)

gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields

This prevents a search for a number like "105" on "All Fields" from
matching against the raw author and commit timestamps. These
timestamps were already not searchable by themselves, and the
displayed format does not match the query string anyway.

Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Make "git describe" output clickable, tooJim Meyering Sat, 10 Dec 2011 15:08:57 +0000 (16:08 +0100)

gitk: Make "git describe" output clickable, too

Automake's contribution guidelines suggest using "git describe" output
in commit logs to reference previous commits. By contrast, in
coreutils, I had acquired the habit of using a bare SHA1 prefix (8 hex
digits), since gitk creates clickable links for that, and not for "git
describe" output.

I prefer the readability of the full "git describe" output, yet want
to retain the gitk links, so this renders as clickable not just
SHA1-like strings, but also an SHA1-like string that is prefixed by
"-g".

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix the display of files when filtered by pathPat Thoyts Tue, 13 Dec 2011 16:50:50 +0000 (16:50 +0000)

gitk: Fix the display of files when filtered by path

Launching 'gitk -- .' or 'gitk -- ..\t' restricts the display to files
under the given directory but the file list is left empty. This is because
the path_filter function fails to match the filenames which are relative
to the working tree to the filter which is filessytem relative.
This solves the problem by making both names fully qualified filesystem
paths before performing the comparison.

Tested-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Use a tabbed dialog to edit preferencesPat Thoyts Tue, 13 Dec 2011 14:56:49 +0000 (14:56 +0000)

gitk: Use a tabbed dialog to edit preferences

This commit converts the user preferences dialog into a tabbed property
sheet grouping general properties, colours and font selections onto
separate pages. The previous implementation was exceeding the screen
height on some systems and this avoids such problems and permits extension
using new pages in the future.

If themed Tk is unavailable or undesired a reasonable facsimile of the
tabbed notebook widget is used instead.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Use "gitk: repo-top-level-dir" as window titleZbigniew Jędrzejewski-Szmek Wed, 9 Nov 2011 16:28:28 +0000 (17:28 +0100)

gitk: Use "gitk: repo-top-level-dir" as window title

Previously, when run in a subdirectory, gitk would show the name
of this subdirectory as title, which was misleading. When run with
GIT_DIR set, it would show the cwd, which is even more misleading.

In case of non-bare repos, the .git suffix in the path is skipped.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

gitk: Make vi-style keybindings more vi-likeJonathan Nieder Mon, 19 Sep 2011 16:49:50 +0000 (11:49 -0500)

gitk: Make vi-style keybindings more vi-like

When commit 6e2dda35 (Add new keybindings, 2005-09-22) added vi-style
keybindings to gitk (an excellent idea!), instead of adopting the
usual "hjkl = left, down, up, right" bindings used by less, vi, rogue,
and many other programs, it used "ijkl = up, left, down, right" to
mimic the inverted-T formation of the arrow keys on a qwerty keyboard,
in the style of Lode runner. So using 'j' and 'k' to scroll through
commits produces utterly confusing results to the vi user, as 'k'
moves down and 'j' moves to the previous commit.

Luckily most non-vi-users are probably using an alternate set of keys
(cursor keys or z/x + n/p) anyway. Switch to the expected vi/nethack
convention.

Requested-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Make "touching paths" search support backslashesYggy King Wed, 13 Jul 2011 08:30:26 +0000 (01:30 -0700)

gitk: Make "touching paths" search support backslashes

Gitk can search for commits touching a specified path. The search text is
always treated as a regular expression, regardless of the matching option
selected (Exact, IgnCase, or Regexp). In particular, backslashes escape
the next character. This is inconvenient on Windows systems, where backslashes
are the norm for path specifiers, for example when copy/pasting from
Windows Explorer or a cmd shell -- these copy-pasted paths must be manually
modified in the gitk search text edit box before they will work.

This change uses the match option "Exact" to mean that a slash is a slash,
not part of a regular expression. Backslashes are converted to frontslashes
before searching, thus allowing easy copy/pasting of paths on Windows
systems. If the previous behaviour of "touching paths" search is desired,
simply select the "Regexp" search mode.

One potential drawback is that the default setting for the match option
($findtype in the code) is "Exact", and so this change alters the default
behaviour, which may confuse users and lead to bug reports.

Signed-off-by: Yggy King <yggy@zeroandone.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Show modified files with separate work treeMartin von Zweigbergk Tue, 24 May 2011 02:44:08 +0000 (22:44 -0400)

gitk: Show modified files with separate work tree

"git rev-parse --is-inside-work-tree" is currently used to determine
whether to show modified files in gitk (the red and green fake
commits). This does not work if the current directory is not inside
the work tree, as can be the case e.g. if GIT_WORK_TREE is
set. Instead, check if the repository is not bare and that we are not
inside the .git directory.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Simplify calculation of gitdirMartin von Zweigbergk Tue, 5 Apr 2011 02:14:18 +0000 (22:14 -0400)

gitk: Simplify calculation of gitdir

Since 5024baa ([PATCH] Make gitk work when launched in a subdirectory,
2007-01-09), gitk has used 'git rev-parse --git-dir' to find the .git
directory. However, gitk still first checks for the $GIT_DIR
environment variable and that the value returned from git-rev-parse
does not point to a file. Since git-rev-parse does both of these
checks already, the checks can safely be removed from gitk. This makes
the gitdir procedure small enough to inline.

This cleanup introduces a UI regression in that the error message will
now be "Cannot find a git repository here." even in the case where
GIT_DIR points to a file, for which the error message was previously
"Cannot find the git directory \"%s\".". It should be noted, though,
that even before this patch, 'gitk --git-dir=path/to/some/file' would
give the former error message.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Run 'git rev-parse --git-dir' only onceMartin von Zweigbergk Tue, 5 Apr 2011 02:14:17 +0000 (22:14 -0400)

gitk: Run 'git rev-parse --git-dir' only once

It seems like gitk has been setting the global variable 'gitdir' at
startup since aa81d97 (gitk: Fix Update menu item, 2006-02-28). It
should therefore no longer be necessary to call the procedure with the
same name (more than once to set the global variable). Remove the
other call sites and use the global variable instead.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Put temporary directory inside .gitMartin von Zweigbergk Tue, 5 Apr 2011 02:14:16 +0000 (22:14 -0400)

gitk: Put temporary directory inside .git

When running "External diff" from gitk, the "from" and "to" files will
first be copied into a directory that is currently
".git/../.gitk-tmp.$pid". When gitk is closed, the directory is
deleted. When the work tree is not at ".git/.." (which is supported
since the previous commit), that directory may not even be git-related
and it does not seem unlikely that permissions may not allow the
temporary directory to be created there. Move the directory inside
.git instead.

This introduces a regression in the case that the .git directory
is readonly, but .git/.. is writeable.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>