Code

git.git
16 years agogit-gui: Move load_config procedure below git-version selection
Shawn O. Pearce [Fri, 12 Oct 2007 04:34:04 +0000 (00:34 -0400)]
git-gui: Move load_config procedure below git-version selection

To better handle configuration options that contain LFs in their
values we want to use the new -z option available in git-config
version 1.5.3 and later.  To configure load_config based upon the
git version we need to move thos below the git-version computation.

No logic changes yet, just a minor reordering of the code.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Change main window layout to support wider screens
Johannes Sixt [Thu, 11 Oct 2007 00:50:40 +0000 (20:50 -0400)]
git-gui: Change main window layout to support wider screens

The layout is changed to have the file lists at the left (Unstaged
Changes at the top, Staged Changes below it) and the diff window
at the right (with the commit area below it).

  +----------+---------------------+
  | Unstaged |  Diff area          |
  |          |                     |
  |          |                     |
  |          |                     |
  +----------+                     |
  | Staged   |                     |
  |          +---------------------+
  |          |  Commit area        |
  |          |                     |
  +----------+---------------------+

The advantages are:

  - The height of the file lists can be adjusted independently to
    fit the files that they contain.
  - The diff viewer is higher.

On wide screens it is ok that the main window is now generally
wider, too.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: update Italian translation
Michele Ballabio [Wed, 10 Oct 2007 13:04:16 +0000 (15:04 +0200)]
git-gui: update Italian translation

An Italian glossary was also added. Some changes:
 * commit (verb): (creare una) nuova revisione
 * commit (noun): revisione
 * checkout: attivazione
 * tracking branch: duplicato locale di ramo remoto
 * repository: archivio
 * some terms are used with more consistency

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Updated po strings based on current sources
Shawn O. Pearce [Wed, 10 Oct 2007 08:11:43 +0000 (04:11 -0400)]
git-gui: Updated po strings based on current sources

16 years agogit-gui: add mingw specific startup wrapper
Steffen Prohaska [Wed, 10 Oct 2007 06:58:59 +0000 (08:58 +0200)]
git-gui: add mingw specific startup wrapper

The wrapper adds the directory it is installed in to PATH.
This is required for the git commands implemented in shell.
git-gui fails to launch them if PATH is not modified.

The wrapper script also accepts an optional command line
switch '--working-dir <dir>' and changes to <dir> before
launching the actual git-gui. This is required to implement
the "Git Gui Here" Explorer shell extension.

As a last step the original git-gui script is launched,
which is expected to be located in the same directory
under the name git-gui.tcl.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: set NO_MSGFMT to force using pure tcl replacement in msysgit
Steffen Prohaska [Wed, 10 Oct 2007 06:58:58 +0000 (08:58 +0200)]
git-gui: set NO_MSGFMT to force using pure tcl replacement in msysgit

Shawn's git-gui Makefile supports the pure tcl replacement
for msgfmt if setting NO_MSGFMT. This patch sets the NO_MSGFMT
for msysgit.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: add directory git-gui is located in to PATH (on Windows)
Steffen Prohaska [Sat, 6 Oct 2007 09:29:02 +0000 (11:29 +0200)]
git-gui: add directory git-gui is located in to PATH (on Windows)

This commit modifies PATH to include a good guess where git
could be found. The first location to search for executable is
the directory git-gui is installed in. This is a good guess for
a sane installation.

Even if git is not available in PATH, git-gui is now able
to find it. Hence git-gui can be passed to wish as an absolute
path without caring about the environment.

We must modify PATH to be able to spawn shell based git commands.
For builtins it would be sufficient to located them and execute
them with their absolute path. But for shell based git commmands
PATH needs to be modified.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'cs/de'
Shawn O. Pearce [Wed, 10 Oct 2007 05:23:23 +0000 (01:23 -0400)]
Merge branch 'cs/de'

* cs/de:
  git-gui: Update German translation, including latest glossary changes
  git-gui: Incorporate glossary changes into existing German translation
  git-gui: Update German glossary according to mailing list discussion
  git-gui: Add more words to translation glossary

16 years agogit-gui: Update German translation, including latest glossary changes
Christian Stimming [Mon, 8 Oct 2007 19:34:56 +0000 (21:34 +0200)]
git-gui: Update German translation, including latest glossary changes

16 years agogit-gui: Incorporate glossary changes into existing German translation
Christian Stimming [Fri, 5 Oct 2007 20:01:39 +0000 (22:01 +0200)]
git-gui: Incorporate glossary changes into existing German translation

16 years agogit-gui: Update German glossary according to mailing list discussion
Christian Stimming [Fri, 5 Oct 2007 20:32:55 +0000 (22:32 +0200)]
git-gui: Update German glossary according to mailing list discussion

16 years agogit-gui: Add more words to translation glossary
Christian Stimming [Fri, 5 Oct 2007 20:30:32 +0000 (22:30 +0200)]
git-gui: Add more words to translation glossary

16 years agogit-gui: Shorten the staged/unstaged changes title bar text
Shawn O. Pearce [Fri, 5 Oct 2007 12:47:23 +0000 (08:47 -0400)]
git-gui: Shorten the staged/unstaged changes title bar text

The titles for the staged and unstaged areas were usually opening
up too narrow by default, causing the text to be clipped by Tcl as
it tried to center the text in the middle of the available area.
This meant that users who were new to git-gui did not get to see
the entire header and may be unclear about what the different lists
are.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Bind Cmd-, to Preferences on Mac OS X
Shawn O. Pearce [Mon, 8 Oct 2007 05:39:08 +0000 (22:39 -0700)]
git-gui: Bind Cmd-, to Preferences on Mac OS X

A Mac OS X UI convention is to have Cmd-, be the accelerator key
for the preferences window, which by convention is located in the
apple menu under a separator below the about command.  We also now
call this "Preferences..." as that is the conventional term used
in English.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Consolidate the Fetch and Push menus into a Remote menu
Shawn O. Pearce [Mon, 8 Oct 2007 05:23:54 +0000 (22:23 -0700)]
git-gui: Consolidate the Fetch and Push menus into a Remote menu

Sometimes the Fetch menu looks really odd, such as if you are in a
repository that has no remotes configured when you start git-gui.
Here we didn't have any items to add to the Fetch menu so it was a
tad confusing for the end-user to see an empty menu on the menu bar.

We now place all of the commands related to fetching and pushing of
changes into a single "Remote" menu.  This way we have a better class
of bucket that we can drop additional remote related items into such
as doing a remote merge or editing the remote configuration specs.

The shortcuts to execute fetch/remote prune/push on existing remote
specifications are now actually submenus listing the remotes by name.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Use progress meter in the status bar during index updates
Shawn O. Pearce [Mon, 8 Oct 2007 01:12:31 +0000 (18:12 -0700)]
git-gui: Use progress meter in the status bar during index updates

If we are updating the index to stage or unstage changes or reverting
files in the working directory we can use the progress handling parts
of our status bar to perform this display work, reducing the amount of
code duplication we have in the index handling module.

Unfortunately the status bar is still a strict approximation as it is
unable to know when git-update-index has processed the data we fed to
it.  The progress bar is actually a progress of the pipe buffer filling
up in the OS, not of the actual work done.  Still, it tells the user we
are working and that has some value.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Include our Git logo in the about dialog
Shawn O. Pearce [Sat, 6 Oct 2007 00:15:10 +0000 (20:15 -0400)]
git-gui: Include our Git logo in the about dialog

Most applications tend to have some sort of pretty image in the
about dialog, because it spruces the screen up a little bit and
makes the user happy about reading the information shown there.
We already have a logo in the repository selection wizard so we
can easily reuse this in the about dialog.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Refactor about dialog code into its own module
Shawn O. Pearce [Fri, 5 Oct 2007 12:38:35 +0000 (08:38 -0400)]
git-gui: Refactor about dialog code into its own module

The about dialog is getting somewhat long in size and will probably
only get more complex as I try to improve upon its display.  As the
options dialog is even more complex than the about dialog we move
the about dialog into its own module to reduce the complexity of the
option dialog module.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Refactor Henrik Nyh's logo into its own procedure
Shawn O. Pearce [Fri, 5 Oct 2007 12:35:41 +0000 (08:35 -0400)]
git-gui: Refactor Henrik Nyh's logo into its own procedure

By moving the logo into its own procedure we can use it in
multiple locations within the UI, but still load it only if
the logo is going to be used by the application.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Wed, 10 Oct 2007 05:09:41 +0000 (01:09 -0400)]
Merge branch 'maint'

* maint:
  git-gui: accept versions containing text annotations, like 1.5.3.mingw.1

16 years agogit-gui: accept versions containing text annotations, like 1.5.3.mingw.1
Steffen Prohaska [Sat, 6 Oct 2007 13:27:22 +0000 (15:27 +0200)]
git-gui: accept versions containing text annotations, like 1.5.3.mingw.1

This commit teaches git-gui to accept versions with annotations
that start with text and optionally end with a dot followed by
a number.

This is needed by the current versioning scheme of msysgit,
which uses versions like 1.5.3.mingw.1. However, the changes
is not limited to this use case. Any version of the form
<numeric version>.<anytext>.<number> would be parsed and only
the starting <numeric version> used for validation.

[sp: Minor edit to remove unnecessary group matching]

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Allow forced push into remote repository
Shawn O. Pearce [Tue, 2 Oct 2007 16:52:22 +0000 (12:52 -0400)]
git-gui: Allow forced push into remote repository

Some workflows allow the user to forcefully update a remote branch,
such as in a "proposed updates" (aka "pu") branch where the branch
is rewound and rebuilt on a daily basis against the current master
branch.  In such a case the "--force" or leading + must be used to
make git-push execute anyway, even though it may be discarding one
or more commits on the remote side.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Wed, 3 Oct 2007 04:17:19 +0000 (00:17 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Don't crash when starting gitk from a browser session
  git-gui: Allow gitk to be started on Cygwin with native Tcl/Tk

Conflicts:

git-gui.sh

16 years agogit-gui: Don't crash when starting gitk from a browser session
Shawn O. Pearce [Tue, 2 Oct 2007 16:27:32 +0000 (12:27 -0400)]
git-gui: Don't crash when starting gitk from a browser session

If the user has started git-gui from the command line as a browser
we offer the gitk menu options but we didn't create the main status
bar widget in the "." toplevel.  Trying to access it while starting
gitk just results in Tcl errors.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Allow gitk to be started on Cygwin with native Tcl/Tk
Shawn O. Pearce [Tue, 2 Oct 2007 16:24:44 +0000 (12:24 -0400)]
git-gui: Allow gitk to be started on Cygwin with native Tcl/Tk

gitk expects $env(GIT_DIR) to be valid as both a path that core Git
and Tcl/Tk can resolve to a valid directory, but it has no special
handling for Cygwin style UNIX paths and Windows style paths.  So
we need to do that for gitk and ensure that only relative paths are
fed to it, thus allowing both Cygwin style and UNIX style paths to
be resolved.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Refer to ourselves as "Git Gui" and not "git-gui"
Shawn O. Pearce [Thu, 27 Sep 2007 06:15:29 +0000 (02:15 -0400)]
git-gui: Refer to ourselves as "Git Gui" and not "git-gui"

When displaying the name of the application in window titles
and menu options (e.g. "About [appname]") we would prefer to
call ourselves "Git Gui" over "git-gui" as the former name is
now being actively used in the Mac OS X UI strings and just
plain looks better to the reader.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Support a native Mac OS X application bundle
Shawn O. Pearce [Thu, 27 Sep 2007 06:30:51 +0000 (02:30 -0400)]
git-gui: Support a native Mac OS X application bundle

If we are building on Darwin (sometimes known as Mac OS X) and we
find the Mac OS X Tk.framework in the expected location we build
a proper Mac OS X application bundle with icons and info list.  The
git-gui and git-citool commands are modified to be very short shell
scripts that just execute the application bundle, starting Tk with
our own info list and icon set.

Although the Makefile change here is rather large it makes for a
much more pleasant user experience on Mac OS X as git-gui now has
its own icon on the dock, in the standard tk_messageBox dialogs,
and the application name now says "Git Gui" instead of "Wish" in
locations such as the menu bar and the alt-tab window.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Use Henrik Nyh's git logo icon on Windows systems
Shawn O. Pearce [Thu, 27 Sep 2007 04:18:29 +0000 (00:18 -0400)]
git-gui: Use Henrik Nyh's git logo icon on Windows systems

Rather than displaying the stock red "Tk" icon in our window
title bars and on the task bar we now show a Git specific logo.
This is Henrik Nyh's logo that we also use in the startup wizard,
scaled to a 16x16 image for Windows task bar usage with a proper
transparent background.

Signed-off-by: Shawn O. Pearce <shawn.o.pearce@bankofamerica.com>
16 years agogit-gui: fix typo in lib/blame.tcl
Michele Ballabio [Thu, 27 Sep 2007 12:53:25 +0000 (14:53 +0200)]
git-gui: fix typo in lib/blame.tcl

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Make the status bar easier to read in the setup wizard
Shawn O. Pearce [Wed, 26 Sep 2007 19:31:42 +0000 (15:31 -0400)]
git-gui: Make the status bar easier to read in the setup wizard

The setup wizard looks better if we layout the progress bar as
two lines:  the first line holds the message text and our text
formatting of the progress while the second line holds the bar
itself.  Both extend the full width of the window and we try to
pad out the message text so the window doesn't expand when the
completed progress number jumps to the next order of magnitude.

This change required updating the progress meter format string
to allow the application to supply the precision.  So we also
are updating all of the translations at once to use the newer
formatting string.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Switch the git-gui logo to Henrik Nyh's logo
Shawn O. Pearce [Wed, 26 Sep 2007 18:59:09 +0000 (14:59 -0400)]
git-gui: Switch the git-gui logo to Henrik Nyh's logo

Henrik came up with this alternative logo for gitweb and posted
it on his blog:

  http://henrik.nyh.se/2007/06/alternative-git-logo-and-favicon

The msysGit port uses his logo within some of their components,
and frankly it looks better here in git-gui for our repository
setup wizard screen.  The logo fits quite nicely along the left
edge of our window, leaving significantly more vertical space
for things like the git-fetch console output.

Because the logo changes the layout charateristics of the setup
window I also needed to adjust some of the padding for our widgets
and stop using a fixed width window size.  We now let Tk compute
the correct size of the main window whenever the layout changes,
and drop the window into roughly the upper left 1/3 of the desktop
so its not quite centered but is likely to be far enough away from
any sort of task bars/menu bars/docks that the user may have along
any edge of the screen.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Don't delete scrollbars in console windows
Shawn O. Pearce [Wed, 26 Sep 2007 18:16:45 +0000 (14:16 -0400)]
git-gui: Don't delete scrollbars in console windows

If we have added a scrollbar to the console window because one
direction has too much text to fit in the available screen space
we should just keep the scrollbars.  Its annoying to watch our
horizontal scrollbar bounce in and out of the window as additional
text is inserted into the widget and the need for the scrollbar
comes and goes.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Don't delete console window namespaces too early
Shawn O. Pearce [Wed, 26 Sep 2007 18:05:54 +0000 (14:05 -0400)]
git-gui: Don't delete console window namespaces too early

If the console finishes displaying its output and is "done" but
needs to draw a scrollbar to show the final output messages it
is possible for Tk to delete the window namespace before it does
the text widget updates, which means we are unable to add the
horizontal or vertical scrollbar to the window when the text
widget decides it cannot draw all glyphs on screen.

We need to delay deleting the window namespace until we know
the window is not going to ever be used again.  This occurs if
we are done receiving output, the command is successful and the
window is closed, or if the window is open and the user chooses
to close the window after the command has completed.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: add a simple msgfmt replacement
Johannes Schindelin [Tue, 25 Sep 2007 03:24:12 +0000 (23:24 -0400)]
git-gui: add a simple msgfmt replacement

The program "msgfmt" was our only dependency on gettext.  Since it
is more than just a hassle to compile gettext on MinGW, here is a
(very simple) drop-in replacement, which Works For Us.

[sp: Changed Makefile to enable/disable po2msg.sh by the new
     NO_MSGFMT variable.]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Copy objects/info/alternates during standard clone
Shawn O. Pearce [Mon, 24 Sep 2007 12:50:58 +0000 (08:50 -0400)]
git-gui: Copy objects/info/alternates during standard clone

If the source repository is using an objects/info/alternates file
we need to copy the file to our new repository so that it can access
any objects that won't be copied/hardlinked as they are stored in the
alternate location.

We explicitly resolve all paths in the objects/info/alternates as
relative to the source repository but then convert them into an
absolute path for the new clone.  This allows the new clone to
access the exact same locaton as the source repository, even if
relative paths had been used before.

Under Cygwin we assume that Git is Cygwin based and that the paths
in objects/info/alternates must be valid Cygwin UNIX paths, so we
need to run `cygpath --unix` on each line in the alternate list.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Keep the UI responsive while counting objects in clone
Shawn O. Pearce [Mon, 24 Sep 2007 12:40:44 +0000 (08:40 -0400)]
git-gui: Keep the UI responsive while counting objects in clone

If we are doing a "standard" clone by way of hardlinking the
objects (or copying them if hardlinks are not available) the
UI can freeze up for a good few seconds while Tcl scans all
of the object directories.  This is espeically noticed on a
Windows system when you are working off network shares and
need to wait for both the NT overheads and the network.

We now show a progress bar as we count the objects and build
our list of things to copy.  This keeps the user amused and
also makes sure we run the Tk event loop often enough that
the window can still be dragged around the desktop.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Don't bother showing OS error message about hardlinks
Shawn O. Pearce [Mon, 24 Sep 2007 12:26:07 +0000 (08:26 -0400)]
git-gui: Don't bother showing OS error message about hardlinks

If we failed to create our test hardlink for the first object
we need to link/copy then the only recourse we have is to make
a copy of the objects.  Users don't really need to know the OS
details about why the hardlink failed as its usually because
they are crossing filesystem boundaries.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Deiconify startup wizard so it raises to the top
Johannes Schindelin [Mon, 24 Sep 2007 02:29:18 +0000 (22:29 -0400)]
git-gui: Deiconify startup wizard so it raises to the top

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Avoid console scrollbars unless they are necessary
Shawn O. Pearce [Sun, 23 Sep 2007 09:25:13 +0000 (05:25 -0400)]
git-gui: Avoid console scrollbars unless they are necessary

We shouldn't create scrollbars for the horziontal or vertical sides
unless there is enough content to make it worth drawing these widgets
on screen.  This way users don't loose screen space to objects that
won't help them navigate the display.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Allow users to choose/create/clone a repository
Shawn O. Pearce [Sat, 22 Sep 2007 07:47:43 +0000 (03:47 -0400)]
git-gui: Allow users to choose/create/clone a repository

If we are started outside of a git repository than it is likely
the user started us from some sort of desktop shortcut icon in
the operating system.  In such a case the user is expecting us to
prompt them to locate the git repository they want to work on,
or to help them make a new repository, or to clone one from an
existing location.  This is a very simple wizard that offers the
user one of these three choices.

When we clone a repository we always use the name `master` in the
local repository, even if the remote side does not appear to point
to that name.  I chose this as a policy decision.  Much of the Git
documentation talks about `master` being the default branch in a
repository and that's what git-init does too.  If the remote side
doesn't call its default branch `master` most users just don't care,
they just want to use Git the way the documentation describes.

Rather than relying on the git-clone Porcelain that ships with
git we build the new repository ourselves and then obtain content
by git-fetch.  This technique simplifies the entire clone process
to roughly: `git init && git fetch && git pull`.  Today we use
three passes with git-fetch; the first pass gets us the bulk of
the objects and the branches, the second pass gets us the tags,
and the final pass gets us the current value of HEAD to initialize
the default branch.

If the source repository is on the local disk we try to use a
hardlink to connect the objects into the new clone as this can
be many times faster than copying the objects or packing them and
passing the data through a pipe to index-pack.  Unlike git-clone
we stick to pure Tcl [file link -hard] operation thus avoiding the
need to fork a cpio process to setup the hardlinks.  If hardlinks
do not appear to be supported (e.g. filesystem doesn't allow them or
we are crossing filesystem boundaries) we use file copying instead.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Refactor some UI init to occur earlier
Shawn O. Pearce [Fri, 21 Sep 2007 07:41:51 +0000 (03:41 -0400)]
git-gui: Refactor some UI init to occur earlier

I'm starting to setup a main window that the user can use to
locate an existing repository, clone an existing repository,
or create a new repository from scratch.  To help do that I
want most of our common UI support already defined before we
start to look for the Git repository, this way if it was not
found we can open a window to help the user locate it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Sat, 22 Sep 2007 02:03:27 +0000 (22:03 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Ensure .git/info/exclude is honored in Cygwin workdirs
  git-gui: Handle starting on mapped shares under Cygwin
  git-gui: Display message box when we cannot find git in $PATH

Conflicts:

git-gui.sh

16 years agogit-gui: Ensure .git/info/exclude is honored in Cygwin workdirs
Shawn O. Pearce [Fri, 21 Sep 2007 15:44:23 +0000 (11:44 -0400)]
git-gui: Ensure .git/info/exclude is honored in Cygwin workdirs

If we are using Cygwin and the git repository is actually a
workdir (by way of git-new-workdir) but this Tcl process is
a native Tcl/Tk and not the Cygwin Tcl/Tk then we are unable
to traverse the .git/info path as it is a Cygwin symlink and
not a standard Windows directory.

So we actually need to start a Cygwin process that can do the
path translation for us and let it test for .git/info/exclude
so we know if we can include that file in our git-ls-files or
not.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Handle starting on mapped shares under Cygwin
Shawn O. Pearce [Fri, 21 Sep 2007 15:08:50 +0000 (11:08 -0400)]
git-gui: Handle starting on mapped shares under Cygwin

I really cannot explain Cygwin's behavior here but if we start
git-gui through Cygwin on a local drive it appears that Cygwin
is leaving $env(PATH) in Unix style, even if it started a native
(non-Cygwin) Tcl/Tk process to run git-gui.  Yet starting that
same git-gui and Tcl/Tk combination through Cygwin on a network
share causes it to automatically convert $env(PATH) into Windows
style, which broke our internal "which" implementation.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Display message box when we cannot find git in $PATH
Shawn O. Pearce [Fri, 21 Sep 2007 14:58:02 +0000 (10:58 -0400)]
git-gui: Display message box when we cannot find git in $PATH

If we cannot find the git executable in the user's $PATH then
we cannot function correctly.  Because we need that to get the
version so we can load our library correctly we cannot rely on
the library function "error_popup" here, as this is all running
before the library path has been configured, so error_popup is
not available to us.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Support native Win32 Tcl/Tk under Cygwin
Shawn O. Pearce [Fri, 21 Sep 2007 01:25:34 +0000 (21:25 -0400)]
git-gui: Support native Win32 Tcl/Tk under Cygwin

Cygwin has been stuck on the 8.4.1 version of Tcl/Tk for quite some
time, even though the main Tcl/Tk distribution is already shipping
an 8.4.15.  The problem is Tcl/Tk no longer supports Cygwin so
apparently building the package for Cygwin is now a non-trivial task.

Its actually quite easy to build the native Win32 version of Tcl/Tk
by compiling with the -mno-cygwin flag passed to GCC but this means
we lose all of the "fancy" Cygwin path translations that the Tcl
library was doing for us.  This is particularly an issue when we
are trying to start git-gui through the git wrapper as the git
wrapper is passing off a Cygwin path for $0 and Tcl cannot find
the startup script or the library directory.

We now use `cygpath -m -a` to convert the UNIX style paths to Windows
style paths in our startup script if we are building on Cygwin.
Doing so allows either the Cygwin-ized Tcl/Tk 8.4.1 that comes with
Cygwin or a manually built 8.4.15 that is running the pure Win32
implementation to read our script.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Fix missing i18n markup in push/fetch windows
Shawn O. Pearce [Thu, 20 Sep 2007 17:03:43 +0000 (13:03 -0400)]
git-gui: Fix missing i18n markup in push/fetch windows

The console window titles should also be marked up with i18n strings so
these can be properly localized.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Thu, 20 Sep 2007 17:01:32 +0000 (13:01 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Avoid using bold text in entire gui for some fonts

16 years agogit-gui: Avoid using bold text in entire gui for some fonts
Simon Sasburg [Tue, 18 Sep 2007 22:33:34 +0000 (00:33 +0200)]
git-gui: Avoid using bold text in entire gui for some fonts

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Mon, 17 Sep 2007 03:15:21 +0000 (23:15 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Disable native platform text selection in "lists"

Conflicts:

lib/browser.tcl

16 years agogit-gui: Disable native platform text selection in "lists" gitgui-0.8.3
Shawn O. Pearce [Mon, 17 Sep 2007 03:12:19 +0000 (23:12 -0400)]
git-gui: Disable native platform text selection in "lists"

Sometimes we use a Tk text widget as though it were a listbox.
This happens typically when we want to show an icon to the left
of the text label or just when a text widget is generally a better
choice then the native listbox widget.

In these cases if we want the user to have control over the selection
we implement our own "in_sel" tag that shows the selected region
and we perform our own selection management in the background
via keybindings and mouse bindings.  In such uses we don't want
the user to be able to activate the native platform selection by
dragging their mouse through the text widget.  Doing so creates a
very confusing display and the user is left wondering what it may
mean to have two different types of selection in the same widget.

Tk doesn't allow us to delete the "sel" tag that it uses internally
to manage the native selection but it will allow us to make it
invisible by setting the tag to have the same display properties
as unselected text.  So long as we don't actually use the "sel"
tag for anything in code its effectively invisible.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Paper bag fix missing translated strings
Shawn O. Pearce [Fri, 14 Sep 2007 05:50:09 +0000 (01:50 -0400)]
git-gui: Paper bag fix missing translated strings

The Tcl expression "[append [mc Foo] Bar]" does not return the string
"FooBar" after translation; instead it is setting the variable Foo to
the value Bar, or if Foo is already defined it is appending Bar onto
the end of it.  This is *not* what we wanted to have happen here.

Tcl's join function is actually the correct function but its default
joinStr argument is a single space.  Unfortunately all of our call
sites do not want an extra space added to their string.  So we need
a small wrapper function to make the call to join with an empty
join string.  In C this is (roughly) the job of the strcat function.
Since strcat is not yet used at the global level it is a reasonable
name to use here.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Make the tree browser also use lightgray selection
Shawn O. Pearce [Fri, 14 Sep 2007 00:52:34 +0000 (20:52 -0400)]
git-gui: Make the tree browser also use lightgray selection

In 9adccb05 Matthijs Melchior changed our selection colors in the
main index/working directory file lists to use a lightgray as the
background color as this made the UI easier to read on all platforms.

When we did that change we missed doing also doing in the file
browser UI.  Doing so just makes the entire thing UI consistent.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: add some strings to translation
Michele Ballabio [Thu, 13 Sep 2007 13:19:05 +0000 (15:19 +0200)]
git-gui: add some strings to translation

Most of these changes were suggested by Shawn Pearce in an answer
to Johannes Schindelin.

Some strings for the blame module were added too.

[sp: Minor edits in blame module formatting]

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Fri, 14 Sep 2007 00:13:59 +0000 (20:13 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Paper bag fix "Commit->Revert" format arguments
  git-gui: Provide 'uninstall' Makefile target to undo an installation
  git-gui: Font chooser to handle a large number of font families

16 years agogit-gui: Paper bag fix "Commit->Revert" format arguments
Shawn O. Pearce [Fri, 14 Sep 2007 00:08:53 +0000 (20:08 -0400)]
git-gui: Paper bag fix "Commit->Revert" format arguments

The recent bug fix to correctly handle filenames with %s (or any
other valid Tcl format specifier) missed a \ on this line and
caused the remaining format arguments to not be supplied when we
updated the status bar.  This caused a Tcl error anytime the user
was trying to perform a file revert.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Provide 'uninstall' Makefile target to undo an installation
Shawn O. Pearce [Thu, 13 Sep 2007 23:50:35 +0000 (19:50 -0400)]
git-gui: Provide 'uninstall' Makefile target to undo an installation

Several users have requested a "make uninstall" target be provided
in the stock git-gui Makefile so that they can undo an install
if git-gui goes to the wrong place during the initial install,
or if they are unhappy with the tool and want to remove it from
their system.

We currently assume that the complete set of files we need to delete
are those defined by our Makefile and current source directory.
This could differ from what the user actually has installed if they
installed one version then attempt to use another to perform the
uninstall.  Right now I'm just going to say that is "pilot error".
Users should uninstall git-gui using the same version of source
that they used to make the installation.  Perhaps in the future we
could read tclIndex and base our uninstall decisions on its contents.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Thu, 13 Sep 2007 23:19:42 +0000 (19:19 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Make backporting changes from i18n version easier

16 years agogit-gui: Font chooser to handle a large number of font families
Shawn O. Pearce [Thu, 13 Sep 2007 23:07:46 +0000 (19:07 -0400)]
git-gui: Font chooser to handle a large number of font families

Simon Sasburg noticed that on X11 if there are more fonts than can
fit in the height of the screen Tk's native tk_optionMenu does not
offer scroll arrows to the user and it is not possible to review
all choices or to select those that are off-screen.  On Mac OS X
the tk_optionMenu works properly but is awkward to navigate if the
list is long.

This is a rewrite of our font selection by providing a new modal
dialog that the user can launch from the git-gui Options panel.
The dialog offers the user a scrolling list of fonts in a pane.
An example text shows the user what the font looks like at the size
they have selected.  But I have to admit the example pane is less
than ideal.  For example in the case of our diff font we really
should show the user an example diff complete with our native diff
syntax coloring.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Simon Sasburg <simon.sasburg@gmail.com>
16 years agogit-gui: Make backporting changes from i18n version easier
Shawn O. Pearce [Thu, 13 Sep 2007 23:04:14 +0000 (19:04 -0400)]
git-gui: Make backporting changes from i18n version easier

This is a very trivial hack to define a global mc procedure that
does not actually perform i18n translations on its input strings.
By declaring an mc procedure here in our maint version of git-gui
we can take patches that are intended for the latest development
version of git-gui and easily backport them without needing to
tweak the mc calls first.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Document the new i18n context support
Shawn O. Pearce [Wed, 12 Sep 2007 21:03:27 +0000 (17:03 -0400)]
git-gui: Document the new i18n context support

Translators working on po files will likely need to know what the
@@noun and @@verb parts are in the original message text, and why
these are different messages in the po files.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Disambiguate "commit"
Harri Ilari Tapio Liusvaara [Wed, 12 Sep 2007 20:02:35 +0000 (23:02 +0300)]
git-gui: Disambiguate "commit"

Commit is used as both verb and noun. While these happen to be
the same in some languages, they are not the same in all
languages, so disambiguate them using context-sensitive i18n.

Signed-off-by: Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Support context-sensitive i18n
Shawn O. Pearce [Wed, 12 Sep 2007 20:47:06 +0000 (16:47 -0400)]
git-gui: Support context-sensitive i18n

Ocassionally, one would want to translate the same string used in
different contexts in diffrent ways. This patch provides a wrapper
for msgcat::mc that trims "@@" and anything coming after it, whether
or not the string actually got translated.

Proposed-by: Harri Ilari Tapio Liusvaara <hliusvaa@cc.hut.fi>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Tue, 11 Sep 2007 22:57:26 +0000 (18:57 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Don't delete send on Windows as it doesn't exist

16 years agogit-gui: Don't delete send on Windows as it doesn't exist
Shawn O. Pearce [Tue, 11 Sep 2007 17:37:45 +0000 (13:37 -0400)]
git-gui: Don't delete send on Windows as it doesn't exist

The Windows port of Tk does not have the send command so we
cannot delete it from our global namespace, but the Mac OS
X and X11 ports do have it.  Switching this delete attempt
into a catch makes send go away, or stay away.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Localize commit/author dates when displaying them
Shawn O. Pearce [Mon, 10 Sep 2007 05:54:16 +0000 (01:54 -0400)]
git-gui: Localize commit/author dates when displaying them

Currently the Git plumbing is not localized so it does not know how
to output weekday and month names that conform to the user's locale
preferences.  This doesn't fit with the rest of git-gui's UI as some
of our dates are formatted in Tcl and some are just read from the Git
plumbing so dates aren't consistently presented.

Since git-for-each-ref is presenting us formatted dates and it offers
no way to change that setting even in git 1.5.3.1 we need to first do
a parse of the text strings it produces, correct for timezones, then
reformat the timestamp using Tcl's formatting routines.

Not exactly what I wanted to do but it gets us consistently presented
date strings in areas like the blame viewer and the revision picker
mega-widget's tooltips.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Mark revision chooser tooltip for translation
Shawn O. Pearce [Mon, 10 Sep 2007 04:40:46 +0000 (00:40 -0400)]
git-gui: Mark revision chooser tooltip for translation

Someone on #git today pointed out that the revision chooser's tooltips
are were being drawn with untranslated strings for the fixed labels we
include, such as "updated", "commit" and "remote".  These strings are
now passed through mc to allow them to be localized.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Mon, 10 Sep 2007 00:56:04 +0000 (20:56 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Trim trailing slashes from untracked submodule names
  git-gui: Assume untracked directories are Git submodules
  git-gui: handle "deleted symlink" diff marker
  git-gui: show unstaged symlinks in diff viewer

16 years agogit-gui: Trim trailing slashes from untracked submodule names
Shawn O. Pearce [Mon, 10 Sep 2007 00:38:05 +0000 (20:38 -0400)]
git-gui: Trim trailing slashes from untracked submodule names

Oddly enough `git ls-files --others` supplies us the name of an
untracked submodule by including the trailing slash but that
same git version will not accept the name with a trailing slash
through `git update-index --stdin`.  Stripping off that final
slash character before loading it into our file lists allows
git-gui to stage changes to submodules just like any other file.

This change should give git-gui users some basic submodule support,
but it is strictly at the plumbing level as we do not actually know
about calling the git-submodule porcelain that is a recent addition
to git 1.5.3.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Assume untracked directories are Git submodules
Shawn O. Pearce [Mon, 10 Sep 2007 00:13:10 +0000 (20:13 -0400)]
git-gui: Assume untracked directories are Git submodules

If `git ls-files --others` returned us the name of a directory then
it is because Git has decided that this directory itself contains a
valid Git repository and its files shouldn't be listed as untracked
for this repository.

In such a case we should label the object as a Git repository and
not just as a directory.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: handle "deleted symlink" diff marker
Michele Ballabio [Sun, 9 Sep 2007 19:09:07 +0000 (21:09 +0200)]
git-gui: handle "deleted symlink" diff marker

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: show unstaged symlinks in diff viewer
Michele Ballabio [Sun, 9 Sep 2007 19:04:45 +0000 (21:04 +0200)]
git-gui: show unstaged symlinks in diff viewer

git-gui has a minor problem with regards to symlinks that point
to directories.

git init
mkdir realdir
ln -s realdir linkdir
git gui

Now clicking on file names in the "unstaged changes" window,
there's a problem coming from the "linkdir" symlink: git-gui
complains with

error reading "file4": illegal operation on a directory

...even though git-gui can add that same symlink to the index just
fine.

This patch fix this by adding a check.

[sp: Minor fix to use {link} instead of "link" in condition
     and to only open the path if it is not a symlink.]

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Sun, 9 Sep 2007 09:03:56 +0000 (05:03 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Avoid use of libdir in Makefile
  git-gui: Disable Tk send in all git-gui sessions
  git-gui: lib/index.tcl: handle files with % in the filename properly

16 years agogit-gui: Avoid use of libdir in Makefile
Shawn O. Pearce [Sun, 9 Sep 2007 03:05:43 +0000 (23:05 -0400)]
git-gui: Avoid use of libdir in Makefile

Dmitry V. Levin pointed out that on GNU linux libdir is often used
in Makefiles to mean "/usr/lib" or "/usr/lib64", a directory that
is meant to hold platform-specific binary files.  Using a different
libdir meaning here in git-gui's Makefile breaks idomatic expressions
like rpm specifile "make libdir=%_libdir".

Originally I asked that the git.git Makefile undefine libdir before
it calls git-gui's own Makefile but it turns out this is very hard
to do, if not impossible.  Renaming our libdir to gg_libdir resolves
this case with a minimum amount of fuss on our part.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Disable Tk send in all git-gui sessions
Shawn O. Pearce [Sun, 9 Sep 2007 03:47:00 +0000 (23:47 -0400)]
git-gui: Disable Tk send in all git-gui sessions

The Tk designers blessed us with the "send" command, which on X11
will allow anyone who can connect to your X server to evaluate any
Tcl code they desire within any running Tk process.  This is just
plain nuts.  If git-gui wants someone running Tcl code within it
then would ask someone to supply that Tcl code to it; waiting for
someone to drop any random Tcl code into us is not fantastic idea.

By renaming send to the empty name the procedure will be removed
from the global namespace and Tk will stop responding to random Tcl
evaluation requests sent through the X server.  Since there is no
facility to filter these requests it is unlikely that we will ever
consider enabling this command.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: lib/index.tcl: handle files with % in the filename properly
Gerrit Pape [Fri, 7 Sep 2007 17:16:59 +0000 (17:16 +0000)]
git-gui: lib/index.tcl: handle files with % in the filename properly

Steps to reproduce the bug:

 $ mkdir repo && cd repo && git init
 Initialized empty Git repository in .git/
 $ touch 'foo%3Fsuite'
 $ git-gui

Then click on the 'foo%3Fsuite' icon to include it in a changeset, a
popup comes with:
'Error: bad field specifier "F"'

Vincent Danjean noticed the problem and also suggested the fix, reported
through
 http://bugs.debian.org/441167

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Tue, 4 Sep 2007 03:07:59 +0000 (23:07 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Properly set the state of "Stage/Unstage Hunk" action
  git-gui: Fix detaching current branch during checkout
  git-gui: Correct starting of git-remote to handle -w option

Conflicts:

git-gui.sh

16 years agogit-gui: Ensure msgfmt failure stops GNU make
Shawn O. Pearce [Mon, 3 Sep 2007 22:54:14 +0000 (18:54 -0400)]
git-gui: Ensure msgfmt failure stops GNU make

If we have a failure executing msgfmt (such as the process just
crashes no matter what arguments you supply it because its own
installation is borked) we should stop the build process rather
than letting it continue along its merry way as if the .msg files
were created.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Properly set the state of "Stage/Unstage Hunk" action
Shawn O. Pearce [Sun, 2 Sep 2007 19:38:04 +0000 (15:38 -0400)]
git-gui: Properly set the state of "Stage/Unstage Hunk" action

Today I found yet another way for the "Stage Hunk" and "Unstage
Hunk" context menu actions to leave the wrong state enabled in
the UI.  The problem this time was that I connected the state
determination to the value of $::current_diff_side (the side the
diff is from).  When the user was last looking at a diff from the
index side and unstages everything the diff panel goes empty, but
the action stayed enabled as we always assumed unstaging was a
valid action.

This change moves the logic for determining when the action is
enabled away from the individual side selection, as they really
are two unrelated concepts.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Fix detaching current branch during checkout
Shawn O. Pearce [Sun, 2 Sep 2007 19:30:26 +0000 (15:30 -0400)]
git-gui: Fix detaching current branch during checkout

If the user tried to detach their HEAD while keeping the working
directory on the same commit we actually did not completely do
a detach operation internally.  The problem was caused by git-gui
not forcing the HEAD symbolic ref to be updated to a SHA-1 hash
when we were not switching revisions.  Now we update the HEAD ref
if we aren't currently detached or the hashes don't match.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Correct starting of git-remote to handle -w option
Shawn O. Pearce [Sun, 2 Sep 2007 19:19:07 +0000 (15:19 -0400)]
git-gui: Correct starting of git-remote to handle -w option

Current versions of git-remote apparently are passing the -w option
to Perl as part of the shbang line:

  #!/usr/bin/perl -w

this caused a problem in git-gui and gave the user a Tcl error with
the message: "git-remote not supported: #!/usr/bin/perl -w".

The fix for this is to treat the shbang line as a Tcl list and look
at the first element only for guessing the executable name.  Once
we know the executable name we use the remaining elements (if any
exist) as arguments to the executable, before the script filename.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: remove dots in some UI strings
Michele Ballabio [Sun, 2 Sep 2007 12:43:00 +0000 (14:43 +0200)]
git-gui: remove dots in some UI strings

Dots in a UI string usually mean that a dialog box will
appear waiting for further input. So this patch removes
unneeded dots for actions that do not require user's
input.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Quiet the msgfmt part of the make process
Shawn O. Pearce [Mon, 3 Sep 2007 04:42:09 +0000 (00:42 -0400)]
git-gui: Quiet the msgfmt part of the make process

I really prefer having a very short and sweet makefile output that
does not flood the user's screen with a ton of commands that they
don't care much about.  Traditionally git-gui has hidden away the
actual commands from output by the $(QUIET*) series of macros but
allow them to be seen with either `make QUIET=` or `make V=1`.

This change makes our i18n message generation process to be a lot
shorter and easier to digest at a glance:

  GITGUI_VERSION = 0.8.2.19.gb868-dirty
    * new locations or Tcl/Tk interpreter
    GEN git-gui
    BUILTIN git-citool
    INDEX lib/
    MSGFMT    po/de.msg 268 translated.
    MSGFMT    po/hu.msg 268 translated.
    MSGFMT    po/it.msg 268 translated.
    MSGFMT    po/ja.msg 268 translated.
    MSGFMT    po/ru.msg 249 translated, 12 fuzzy, 4 untranslated.
    MSGFMT po/zh_cn.msg 60 translated, 37 fuzzy, 168 untranslated.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Correct stock message for 'Invalid font specified in %s'
Shawn O. Pearce [Mon, 3 Sep 2007 04:22:19 +0000 (00:22 -0400)]
git-gui: Correct stock message for 'Invalid font specified in %s'

This particular message is talking about a specific option in the
configuration file named "gui.$name".  This option is not localized
so we cannot localize the "gui." that denotes the section the option
$name is found within.  Currently there are no plans to localize the
configuration options for git-gui, but if that were to change in the
future then it would be necessary to localize not only the "gui."
section prefix but also the $name (fontui and fontdiff).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Update po/README as symlink process is not necessary
Shawn O. Pearce [Mon, 3 Sep 2007 04:17:04 +0000 (00:17 -0400)]
git-gui: Update po/README as symlink process is not necessary

We don't actually need to create the lib/msgs symlink back to our
po directory in the source tree.  git-gui.sh is smart enough to
figure out this is where the msg files are and will load them from
the po directory if invoked as git-gui.sh.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Added initial version of po/glossary/zh_cn.po
Xudong Guan [Wed, 25 Jul 2007 12:47:17 +0000 (13:47 +0100)]
git-gui: Added initial version of po/glossary/zh_cn.po

with contributions from LI Yang, WANG Cong, ZHANG Le, and rae l
from the zh-kernel.org mailing list.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoGerman glossary for translation
Christian Stimming [Tue, 24 Jul 2007 12:59:15 +0000 (14:59 +0200)]
German glossary for translation

Signed-off-by: Christian Stimming <christian.stimming@ibeo-as.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoHungarian translation of git-gui
Miklos Vajna [Fri, 27 Jul 2007 12:37:33 +0000 (14:37 +0200)]
Hungarian translation of git-gui

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agogit-gui: initial version of russian translation
Irina Riesen [Sun, 22 Jul 2007 11:57:12 +0000 (13:57 +0200)]
git-gui: initial version of russian translation

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Irina Riesen <irina.riesen@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoItalian translation of git-gui
Paolo Ciarrocchi [Sun, 22 Jul 2007 10:51:13 +0000 (12:51 +0200)]
Italian translation of git-gui

[jes: includes patches from Michele Ballabio]

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoJapanese translation of git-gui
しらいしななこ [Wed, 25 Jul 2007 08:59:58 +0000 (17:59 +0900)]
Japanese translation of git-gui

[jes: Also includes work from Junio Hamano]

Signed-off-by: しらいしななこ <nanako3@bluebottle.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoInitial Chinese translation for git-gui
Xudong Guan [Sun, 22 Jul 2007 00:08:56 +0000 (01:08 +0100)]
Initial Chinese translation for git-gui

Simplified Chinese, in UTF-8 encoding.

Signed-off-by: Xudong Guan <xudong.guan@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoGerman translation for git-gui
Christian Stimming [Sat, 21 Jul 2007 12:18:14 +0000 (14:18 +0200)]
German translation for git-gui

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoAdd glossary translation template into git.
Christian Stimming [Fri, 27 Jul 2007 17:24:45 +0000 (19:24 +0200)]
Add glossary translation template into git.

This way, it should be easier for new translators to actually find out
about the glossary.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoAdd glossary that can be converted into a po file for each language.
Christian Stimming [Mon, 23 Jul 2007 20:11:12 +0000 (22:11 +0200)]
Add glossary that can be converted into a po file for each language.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoIgnore po/*.msg
Johannes Schindelin [Sun, 22 Jul 2007 11:31:45 +0000 (12:31 +0100)]
Ignore po/*.msg

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoAdd po/git-gui.pot
Johannes Schindelin [Sun, 22 Jul 2007 01:12:18 +0000 (02:12 +0100)]
Add po/git-gui.pot

Usually, generated files are not part of the tracked content in
a project.  However, translators may lack the tools to generate
git-gui.pot.  Besides, it is possible that a contributor does
not even check out the repository, but gets this file via gitweb.

Pointed out by Junio.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agogit-gui po/README: Guide to translators
Junio C Hamano [Fri, 27 Jul 2007 23:05:16 +0000 (16:05 -0700)]
git-gui po/README: Guide to translators

This short note is to help a translation contributor to help us
localizing git-gui message files by covering the basics.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 years agoMakefile rules for translation catalog generation and installation.
Christian Stimming [Sat, 21 Jul 2007 12:17:07 +0000 (14:17 +0200)]
Makefile rules for translation catalog generation and installation.

[jes: with fixes by the i18n team.]

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years agoMark strings for translation.
Christian Stimming [Sat, 21 Jul 2007 12:21:34 +0000 (14:21 +0200)]
Mark strings for translation.

The procedure [mc ...] will translate the strings through msgcat.
Strings must be enclosed in quotes, not in braces, because otherwise
xgettext cannot extract them properly, although on the Tcl side both
delimiters would work fine.

[jes: I merged the later patches to that end.]

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>