Code

git.git
15 years agogit-gui 0.11 gitgui-0.11.0
Shawn O. Pearce [Sun, 10 Aug 2008 07:02:08 +0000 (00:02 -0700)]
git-gui 0.11

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
Johannes Sixt [Mon, 4 Aug 2008 20:09:46 +0000 (22:09 +0200)]
git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'

The new execdir is two levels below the root directory, while
the old execdir 'bin' was only one level below.  This commit
adapts the discovery of oguilib that uses relative paths
accordingly. We determine whether we have the extra level in the same
way in which the Makefile defines sharedir, i.e. whether the last
directory part is 'git-core'.

Inspired-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: add a part about format strings in po/README
Michele Ballabio [Sun, 3 Aug 2008 11:12:14 +0000 (13:12 +0200)]
git-gui: add a part about format strings in po/README

This should help tranlators that need to reorder words and strings.
Original explanation by Christian Stimming.

Also remove unneeded backslashes.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: update po/it.po
Michele Ballabio [Wed, 21 May 2008 14:09:14 +0000 (16:09 +0200)]
git-gui: update po/it.po

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: update Japanese translation
しらいしななこ [Sun, 3 Aug 2008 08:01:50 +0000 (17:01 +0900)]
git-gui: update Japanese translation

This updates Japanese translation to match the updated git-gui.pot.

Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Update swedish translation.
Mikael Magnusson [Sat, 2 Aug 2008 23:46:23 +0000 (01:46 +0200)]
git-gui: Update swedish translation.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Update git-gui.pot for 0.11 nearing release
Shawn O. Pearce [Sat, 2 Aug 2008 21:48:33 +0000 (14:48 -0700)]
git-gui: Update git-gui.pot for 0.11 nearing release

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Update German translation
Christian Stimming [Sat, 2 Aug 2008 07:54:51 +0000 (09:54 +0200)]
git-gui: Update German translation

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui (Windows): Change wrapper to execdir 'libexec/git-core'
Steffen Prohaska [Sun, 27 Jul 2008 16:49:43 +0000 (18:49 +0200)]
git-gui (Windows): Change wrapper to execdir 'libexec/git-core'

git-gui needs bindir in PATH to be able to run 'git'.  bindir
however is not necessarily in PATH if started directly through a
Windows shortcut.  Therefore, we used to add the directory
git-gui is located in.  But with the new 'libexec/git-core'
layout this directory is no longer identical to bindir.

This commit modifies the wrapper script to discover the bindir
and add it to PATH.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui (Windows): Switch to relative discovery of oguilib
Steffen Prohaska [Sun, 27 Jul 2008 16:49:42 +0000 (18:49 +0200)]
git-gui (Windows): Switch to relative discovery of oguilib

Instead of using an absolute path, git-gui can discover its
gui library using a relative path from execdir.  We want to
use the relative path discovery on MinGW to avoid issues
with translation of absolute paths.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Correct installation of library to be $prefix/share
Steffen Prohaska [Sun, 27 Jul 2008 21:23:30 +0000 (14:23 -0700)]
git-gui: Correct installation of library to be $prefix/share

We always wanted the library for git-gui to install into the
$prefix/share directory, not $prefix/libexec/share.  All of
the files in our library are platform independent and may
be reused across systems, like any other content stored in
the share directory.

Our computation of where our library should install to was broken
when git itself started installing to $prefix/libexec/git-core,
which was one level down from where we expected it to be.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Fix gitk search in $PATH to work on Windows
Shawn O. Pearce [Wed, 30 Jul 2008 05:36:58 +0000 (22:36 -0700)]
git-gui: Fix gitk search in $PATH to work on Windows

Back in 15430be5a1 ("Look for gitk in $PATH, not $LIBEXEC/git-core")
git-gui learned to use [_which gitk] to locate where gitk's script
is as Git 1.6 will install gitk to $prefix/bin (in $PATH) and all
of the other tools are in $gitexecdir.

This failed on Windows because _which adds the ".exe" suffix as it
searches for the program on $PATH, under the assumption that we can
only execute something from Tcl if it is a proper Windows executable.

When scanning for gitk on Windows we need to omit the ".exe" suffix.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Preserve scroll position on reshow_diff.
Alexander Gavrilov [Sun, 27 Jul 2008 06:35:38 +0000 (10:35 +0400)]
git-gui: Preserve scroll position on reshow_diff.

It is especially useful for Stage/Unstage Line, because
they invoke full state scan and diff reload, which originally
would reset the scroll position to the top of the file.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Fix the Remote menu separator.
Alexander Gavrilov [Sun, 27 Jul 2008 06:34:21 +0000 (10:34 +0400)]
git-gui: Fix the Remote menu separator.

It was positioned incorrectly (offset by one position)
if the menu had a tear-off handle.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: "Stage Line": Treat independent changes in adjacent lines better
Johannes Sixt [Thu, 17 Jul 2008 13:21:51 +0000 (15:21 +0200)]
git-gui: "Stage Line": Treat independent changes in adjacent lines better

Assume that we want to commit these states:

  Old state == HEAD    Intermediate state   New state
  --------------------------------------------------------
  context before       context before       context before
  old 1                new 1                new 1
  old 2                old 2                new 2
  context after        context after        context after

that is, want to commit two changes in this order:

  1. transform "old 1" into "new 1"
  2. transform "old 2" into "new 2"

[This discussion and this patch is about this very case and one other case
as outlined below; any other intermediate states that one could imagine are
not affected by this patch.]

Now assume further, that we have not staged and commited anything, but we
have already changed the working file to the new state. Then we will see
this hunk in the "Unstaged Changes":

  @@ -1,4 +1,4 @@
   context before
  -old 1
  -old 2
  +new 1
  +new 2
   context after

The obvious way to stage the intermediate state is to apply "Stage This
Line" to "-old 1" and "+new 1". Unfortunately, this resulted in this
intermediate state:

  context before
  old 2
  new 1
  context after

which is not what we wanted. In fact, it was impossible to stage the
intermediate state using "Stage Line". The crux was that if a "+" line was
staged, then the "-" lines were converted to context lines and arranged
*before* the "+" line in the forged hunk that we fed to 'git apply'.

With this patch we now treat "+" lines that are staged differently. In
particular, the "-" lines before the "+" block are moved *after* the
staged "+" line. Now it is possible to get the correct intermediate state
by staging "-old 1" and "+new 1". Problem solved.

But there is a catch.

Noticing that we didn't get the right intermediate state by staging
"-old 1" and "+new 1", we could have had the idea to stage the complete
hunk and to *unstage* "-old 2" and "+new 2". But... the result is the same.
The reason is that there is the exact symmetric problem with unstaging the
last "-" and "+" line that are in adjacent blocks of "-" and "+" lines.

This patch does *not* change the way in which "-" lines are *unstaged*.

Why? Because if we did (i.e. move "+" lines before the "-" line after
converting them to context lines), then it would be impossible to stage
this intermediate state:

  context before
  old 1
  new 2
  context after

that is, it would be impossible to stage the two independet changes in the
opposite order.

Let's look at this case a bit further: The obvious way to get this
intermediate state would be to apply "Stage This Line" to "-old 2" and
"+new 2". Before this patch, this worked as expected. With this patch, it
does not work as expected, but it can still be achieved by first staging
the entire hunk, then *unstaging* "-old 1" and "+new 1".

In summary, this patch makes a common case possible, at the expense that
a less common case is made more complicated for the user.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Fix "Stage/Unstage Line" with one line of context.
Johannes Sixt [Tue, 15 Jul 2008 21:11:00 +0000 (23:11 +0200)]
git-gui: Fix "Stage/Unstage Line" with one line of context.

To "Stage/Unstage Line" we construct a patch that contains exactly one
change (either addition or removal); the hunk header was forged by counting
the old side and adjusting the count by +/-1 for the new side. But when we
counted the context we never counted the changed line itself. If the hunk
had only one removal line and one line of context, like this:

    @@ -1,3 +1,2 @@
     context 1
    -removal
     context 2

We had constructed this patch:

    @@ -1,2 +1,1 @@
     context 1
    -removal
     context 2

which does not apply because git apply deduces that it must apply at the
end of the file. ("context 2" is considered garbage and ignored.) The fix
is that removal lines must be counted towards the context of the old side.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Correct 'Visualize Branches' on Mac OS X to start gitk
Shawn O. Pearce [Fri, 25 Jul 2008 22:08:33 +0000 (15:08 -0700)]
git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk

In Git 1.6 and later gitk is in $prefix/bin while git-gui and all
of the other commands are in $gitexecdir, which is typically not
the same as $prefix/bin.  So we cannot launch $gitexecdir/gitk and
expect it to actually start gitk properly.

By allowing git-gui to locate the script via $PATH and then using
exactly that path when we source it during the application start
we can correctly run gitk on any Git 1.5 or later.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Look for gitk in $PATH, not $LIBEXEC/git-core
Abhijit Menon-Sen [Thu, 24 Jul 2008 13:28:53 +0000 (18:58 +0530)]
git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoAdd a menu item to invoke full copy detection in blame.
Alexander Gavrilov [Wed, 16 Jul 2008 20:51:20 +0000 (00:51 +0400)]
Add a menu item to invoke full copy detection in blame.

Add a context menu item to invoke blame -C -C -C on a chunk
of the file. The results are used to update the 'original
location' column of the blame display.

The chunk is computed as the smallest line range that covers
both the 'last change' and 'original location' ranges of the
line that was clicked to open the menu.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoKill the blame back-end on window close.
Alexander Gavrilov [Wed, 16 Jul 2008 20:48:08 +0000 (00:48 +0400)]
Kill the blame back-end on window close.

Currently 'git-gui blame' does not kill its back-end
process, hoping that it will die anyway when the pipe
is closed. However, in some cases the process works
for a long time without producing any output. This
behavior results in a runaway CPU hog.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoAdd options to control the search for copies in blame.
Alexander Gavrilov [Wed, 16 Jul 2008 20:43:48 +0000 (00:43 +0400)]
Add options to control the search for copies in blame.

On huge repositories, -C -C can be way too slow to be
unconditionally enabled, and it can also be useful to control
its precision.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoFix pre-commit hooks under MinGW/MSYS
Alexander Gavrilov [Wed, 16 Jul 2008 20:12:28 +0000 (00:12 +0400)]
Fix pre-commit hooks under MinGW/MSYS

Apply the work-around for checking the executable
permission of hook files not only on Cygwin, but on
Windows in general.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: MERGE_RR lives in .git/ directly with newer Git versions
Johannes Schindelin [Sat, 12 Jul 2008 14:56:59 +0000 (15:56 +0100)]
git-gui: MERGE_RR lives in .git/ directly with newer Git versions

Now that MERGE_RR was moved out of .git/rr-cache/, we have to delete
it somewhere else.  Just in case somebody wants to use a newer git-gui
with an older Git, the file .git/rr-cache/MERGE_RR is removed, too (if
it exists).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Exit shortcut in MacOSX repaired
Soeren Finster [Mon, 7 Jul 2008 16:50:13 +0000 (18:50 +0200)]
git-gui: Exit shortcut in MacOSX repaired

Now, as in all OSX apps, there is only one quit menu entry.
It's automatically in the wish menu and calls ::tk::mac::Quit when used.

Signed-off-by: Soeren Finster <sf@9by6.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Implement "Stage/Unstage Line"
Johannes Sixt [Fri, 27 Jun 2008 07:22:01 +0000 (09:22 +0200)]
git-gui: Implement "Stage/Unstage Line"

This adds a context menu entry below "Stage/Unstage Hunk" that stages or
unstages just the line under the mouse pointer.

This is by itself useful, for example, if there are unrelated changes in
the same hunk and the hunk cannot be split by reducing the context.

The feature can also be used to split a hunk by staging a number of
additions (or unstaging a number of removals) until there are enough
context lines that the hunk gets split.

The implementation reads the complete hunk that the line lives in, and
constructs a new hunk by picking existing context lines, removing unneeded
change lines and transforming other change lines to context lines. The
resulting hunk is fed through 'git apply' just like in the "Stage/Unstage
Hunk" case.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Don't select the wrong file if the last listed file is staged.
Abhijit Menon-Sen [Wed, 25 Jun 2008 10:36:50 +0000 (16:06 +0530)]
git-gui: Don't select the wrong file if the last listed file is staged.

Johannes Sixt noticed that if the last file in the list was staged, my
earlier patch would display the diff for the penultimate file, but show
the file _before_ that as being selected.

This was due to my misunderstanding the lno argument to show_diff.

This patch fixes the problem: lno is not decremented in the special case
to handle the last item in the list (though we still need to use $lno-1
to find the right path for the next diff).

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Fix accidental staged state toggle when clicking top pixel row
Richard Quirk [Fri, 20 Jun 2008 14:58:15 +0000 (16:58 +0200)]
git-gui: Fix accidental staged state toggle when clicking top pixel row

If a text widget is asked the index at x,y with y == 0 or y == 1 it will
always return 1.0 as the nearest index, regardless of the x position.

This means that clicking the top 2 pixels of the Unstaged/Staged Changes
lists caused the state of the file there to be toggled. This patch
checks that the pixel clicked is greater than 1, so there is less chance
of accidentally staging or unstaging changes.

Signed-off-by: Richard Quirk <richard.quirk@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Move on to the next filename after staging/unstaging a change
Abhijit Menon-Sen [Thu, 12 Jun 2008 22:12:10 +0000 (03:42 +0530)]
git-gui: Move on to the next filename after staging/unstaging a change

Suppose the "Unstaged Changes" pane contains a list of files, and one of
them is selected (i.e., that diff is currently being displayed). If one
clicks on the icon to stage the change, git-gui clears the diff and one
has to click on another filename to see the next diff in the list.

This patch changes that behaviour. If one clicks on the icon to stage
(or unstage) the file whose diff is being displayed, git-gui will move
on to the next filename in the list and display that diff instead of a
blank diff pane. If the selected file was at the end of the list, the
diff pane will display the previous diff instead; if the selected file
was the only one listed, the diff pane will become blank.

If no diff is currently being displayed, this patch changes nothing.

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Vertically align textboxes with labels gitgui-0.10.2
Twiinz [Mon, 19 May 2008 04:01:58 +0000 (00:01 -0400)]
git-gui: Vertically align textboxes with labels

In git-gui after clicking either on 'Create New Repository' or
'Open Existing Repository' the form elements aren't centered like
they are pretty much everywhere else in the app. At least when ran
on a mac, haven't checked on other platforms.

Using grid instead of pack seems to fix this.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Handle workdir detection when CYGWIN=nowinsymlinks
Shawn O. Pearce [Wed, 21 May 2008 20:40:10 +0000 (16:40 -0400)]
git-gui: Handle workdir detection when CYGWIN=nowinsymlinks

If the user has put nowinsymlinks into their CYGWIN environment
variable any symlinks created by a Cygwin process (e.g. ln -s)
will not have the ".lnk" suffix.  In this case workdir is still
a workdir, but our detection of looking for "info.lnk" fails
as the symlink is actually a normal file called "info".

Instead we just always use Cygwin's test executable to see if
info/exclude is a file.  If it is, we assume from there on it
can be read by git-ls-files --others and is thus safe to use
on the command line.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Add a --trace command line option
Shawn O. Pearce [Sun, 18 May 2008 17:08:17 +0000 (13:08 -0400)]
git-gui: Add a --trace command line option

Often new Git users want to know what commands git-gui uses to make
changes, so they can learn the command line interface by mimicking
what git-gui does in response to GUI actions.  Showing the direct
commands being executed is easy enough to implement but this is of
little value to end-users because git-gui frequently directly calls
plumbing, not porcelain.

Since the code is already written and tested, its fairly harmless
to include.  It may not help a new end-user, but it can help with
debugging git-gui or reverse-engineering its logic to further make
changes to it or implement another GUI for Git.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Delete branches with 'git branch -D' to clear config
Shawn O. Pearce [Fri, 9 May 2008 00:29:42 +0000 (20:29 -0400)]
git-gui: Delete branches with 'git branch -D' to clear config

If we are deleting a local branch from refs/heads/ we need to
make sure any associated configuration stored in .git/config is
also removed (such as branch.$name.remote and branch.$name.merge).
The easiest way to do this is to use git-branch as that automatically
will look for and delete configuration keys as necessary.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogit-gui: Setup branch.remote,merge for shorthand git-pull
Shawn O. Pearce [Fri, 9 May 2008 00:16:43 +0000 (20:16 -0400)]
git-gui: Setup branch.remote,merge for shorthand git-pull

When creating new branches if branch.autosetupmerge is not set, or
is set to true or always and we have been given a remote tracking
branch as the starting point for a new branch we want to create the
necessary configuration options in .git/config for the new branch
so that a no argument git-pull on the command line pulls from the
remote repository's branch.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Update German translation
Christian Stimming [Thu, 1 May 2008 09:51:47 +0000 (11:51 +0200)]
git-gui: Update German translation

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Thu, 24 Apr 2008 01:38:30 +0000 (21:38 -0400)]
Merge branch 'maint'

* maint:
  git-gui: Don't use '$$cr master' with aspell earlier than 0.60

16 years agogit-gui: Don't use '$$cr master' with aspell earlier than 0.60
Shawn O. Pearce [Thu, 24 Apr 2008 01:34:58 +0000 (21:34 -0400)]
git-gui: Don't use '$$cr master' with aspell earlier than 0.60

Apparently aspell 0.50 does not recognize "$$cr master" as a command,
but instead tries to offer suggestions for how to correctly spell
the word "cr".  This is not quite what we are after when we want
the name of the current dictionary.

Instead of locking up git-gui waiting for a response that may never
come back from aspell we avoid sending this command if the binary
we have started claims to be before version 0.60.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Report less precise object estimates for database compression
Johannes Sixt [Mon, 14 Apr 2008 08:51:33 +0000 (10:51 +0200)]
git-gui: Report less precise object estimates for database compression

On startup, git-gui warns if there are many loose objects. It does so by
saying, e.g., that there are "approximately 768 loose objects". But isn't
"768" a very accurate number? Lets say "750", which (while still being a
very precise number) sounds much more like an estimation.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: use +/- instead of ]/[ to show more/less context in diff gitgui-0.10.1
Michele Ballabio [Fri, 4 Apr 2008 21:04:42 +0000 (23:04 +0200)]
git-gui: use +/- instead of ]/[ to show more/less context in diff

On some systems, brackets cannot be used as event details
(they don't have a keysym), so use +/- instead (both on
keyboard and keypad) and add ctrl-= as a synonym of ctrl-+
for convenience.

[sp: Had to change accelerator to show only "$M1T-="; the
     original version included "$M1T-+ $M1T-=" but this is
 not drawn at all on Mac OS X.]

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Update french translation
Christian Couder [Sat, 5 Apr 2008 02:20:23 +0000 (04:20 +0200)]
git-gui: Update french translation

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Switch keybindings for [ and ] to bracketleft and bracketright
Shawn O. Pearce [Thu, 3 Apr 2008 22:06:29 +0000 (18:06 -0400)]
git-gui: Switch keybindings for [ and ] to bracketleft and bracketright

Thanks to Michele Ballabio for the quick fix.
This resolves the error introduced by c91ee2bd61.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui 0.10 gitgui-0.10.0
Shawn O. Pearce [Wed, 2 Apr 2008 06:17:11 +0000 (02:17 -0400)]
git-gui 0.10

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Add shortcut keys for Show More/Less Context
Jonathan del Strother [Tue, 1 Apr 2008 10:54:03 +0000 (11:54 +0100)]
git-gui: Add shortcut keys for Show More/Less Context

Bound to Ctrl/Cmd + left & right square brackets, depending on
your platform.

[sp: Added missing binds for . to allow shortcuts to work when
     not focused in the commit message area.]

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Improve directions regarding POT update in po/README
Junio C Hamano [Sat, 15 Mar 2008 07:43:34 +0000 (00:43 -0700)]
git-gui: Improve directions regarding POT update in po/README

Keeping POT up to date relative to the software is absolutely
necessary.  What is unwarranted is updating language files at
the same time by running msgmerge without checking if there is
any outstanding translation work first.  If we assume that the
translators do not have access to msgmerge, that is a good service
to them (the less they have to do, the better), but otherwise,
it is better to be leave po/${language}.po files alone.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Update Japanese translation
しらいしななこ [Sat, 15 Mar 2008 11:12:00 +0000 (20:12 +0900)]
git-gui: Update Japanese translation

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Adjusted Japanese translation to updated POT
Shawn O. Pearce [Sat, 15 Mar 2008 06:22:41 +0000 (02:22 -0400)]
git-gui: Adjusted Japanese translation to updated POT

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Update Japanese translation
しらいしななこ [Fri, 14 Mar 2008 13:03:21 +0000 (22:03 +0900)]
git-gui: Update Japanese translation

I updated Japanese translation for the latest git-gui.

Signed-off-by: しらいしななこ <nanako3@bluebottle.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Don't translate the special Apple menu
Shawn O. Pearce [Sat, 15 Mar 2008 05:11:08 +0000 (01:11 -0400)]
git-gui: Don't translate the special Apple menu

Peter Karlsson pointed out there is no value in translating the
string "Apple", as this is used as the dummy label for the Apple
menu on Mac OS X systems.

The Apple menu is actually not the menu with the Apple corporate
logo, but the menu next to it, which shows the name of the
application and is typically called the application menu.  Most users
of git-gui see this menu titled as "Git Gui".  The actual label of
this menu comes from our Info.plist file and cannot be specified
by any other means.  Translating this string in the Tcl PO files
is not necessary.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Updated Hungarian translation (e5fba18)
Miklos Vajna [Fri, 14 Mar 2008 16:28:53 +0000 (17:28 +0100)]
git-gui: Updated Hungarian translation (e5fba18)

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: update russian translation
Alex Riesen [Fri, 14 Mar 2008 22:25:57 +0000 (23:25 +0100)]
git-gui: update russian translation

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: remove spurious "fuzzy" attributes in po/it.po
Michele Ballabio [Fri, 14 Mar 2008 20:59:52 +0000 (21:59 +0100)]
git-gui: remove spurious "fuzzy" attributes in po/it.po

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: updated Swedish translation
Peter Karlsson [Fri, 14 Mar 2008 06:36:44 +0000 (02:36 -0400)]
git-gui: updated Swedish translation

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Regenerated po template and merged translations with it
Peter Karlsson [Fri, 14 Mar 2008 06:36:18 +0000 (02:36 -0400)]
git-gui: Regenerated po template and merged translations with it

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoUpdate Hungarian translation. 100% completed.
Miklos Vajna [Thu, 13 Mar 2008 12:31:10 +0000 (13:31 +0100)]
Update Hungarian translation. 100% completed.

16 years agogit-gui: update Italian translation
Michele Ballabio [Thu, 14 Feb 2008 12:42:19 +0000 (13:42 +0100)]
git-gui: update Italian translation

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Simplify MSGFMT setting in Makefile
Junio C Hamano [Wed, 12 Mar 2008 05:29:52 +0000 (22:29 -0700)]
git-gui: Simplify MSGFMT setting in Makefile

To prepare msg files for Tcl scripts, the command that is set to MSGFMT
make variable needs to be able to grok "--tcl -l <lang> -d <here>" options
correctly.  This patch simplifies the tests done in git-gui's Makefile to
directly test this condition.  If the test run does not exit properly with
zero status (either because you do not have "msgfmt" itself, or your
"msgfmt" is too old to grok --tcl option --- the reason does not matter),
have it fall back to po/po2msg.sh

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Add option for changing the width of the commit message text box
Adam Piątyszek [Thu, 6 Mar 2008 19:38:40 +0000 (20:38 +0100)]
git-gui: Add option for changing the width of the commit message text box

The width of the commit message text area is currently hard-coded
to 75 characters. This value might be not optimal for some projects.
For instance users who would like to generate GNU-style ChangeLog
file from git commit message might prefer commit messages of width
no longer than 70 characters.

This patch adds a global and per repository option "Commit Message
Text Width", which could be used to change the width of the commit
message text area.

Signed-off-by: Adam Piątyszek <ediap@users.sourceforge.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: if a background colour is set, set foreground colour as well
Philipp A. Hartmann [Wed, 5 Mar 2008 16:54:22 +0000 (17:54 +0100)]
git-gui: if a background colour is set, set foreground colour as well

In several places, only the background colour is set to an explicit
value, sometimes even "white".  This does not work well with dark
colour themes.

This patch tries to set the foreground colour to "black" in those
situations, where an explicit background colour is set without defining
any foreground colour.

Signed-off-by: Philipp A. Hartmann <ph@sorgh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: translate the remaining messages in zh_cn.po to chinese
eric miao [Sun, 6 Jan 2008 09:47:05 +0000 (17:47 +0800)]
git-gui: translate the remaining messages in zh_cn.po to chinese

'make' shows:
  MSGFMT po/zh_cn.msg 368 translated, 2 fuzzy, 1 untranslated message.

1. update the zh_cn.po and translate the remaining messages in chinese

2. correct some of the previously mis-translated messages

3. add a list of word interpretation in the head as a guideline for
   subsequent updatings and translations

Signed-off-by: eric miao <eric.miao@marvell.com>
Acked-by: Xudong Guan <xudong.guan@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Wed, 5 Mar 2008 07:13:37 +0000 (02:13 -0500)]
Merge branch 'maint'

* maint:
  git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails

16 years agogit-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
Shawn O. Pearce [Thu, 28 Feb 2008 00:29:34 +0000 (19:29 -0500)]
git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails

Mac OS X Tiger may have a msgfmt available but it doesn't understand
how to implement --tcl.  Falling back to po2msg.sh on such systems
is a reasonable behavior.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Thu, 28 Feb 2008 06:29:19 +0000 (01:29 -0500)]
Merge branch 'maint'

* maint:
  git-gui: Paper bag fix info dialog when no files are staged at commit

16 years agogit-gui: Paper bag fix info dialog when no files are staged at commit gitgui-0.9.3
Shawn O. Pearce [Thu, 28 Feb 2008 06:28:45 +0000 (01:28 -0500)]
git-gui: Paper bag fix info dialog when no files are staged at commit

If the user tries to commit their changes without actually staging
anything we used to display an informational dialog suggesting they
first stage those changes, then retry the commit feature.

Unfortunately I broke this in aba15f7 ("Ensure error dialogs always
appear over all other windows") and failed to fix it in the paper
bag fix that came one day after it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Fri, 22 Feb 2008 06:40:25 +0000 (01:40 -0500)]
Merge branch 'maint'

* maint:
  git-gui: Focus insertion point at end of strings in repository chooser
  git-gui: Avoid hardcoded Windows paths in Cygwin package files
  git-gui: Default TCL_PATH to same location as TCLTK_PATH
  git-gui: Paper bag fix error dialogs opening over the main window

16 years agogit-gui: Focus insertion point at end of strings in repository chooser
Shawn O. Pearce [Mon, 11 Feb 2008 05:53:52 +0000 (00:53 -0500)]
git-gui: Focus insertion point at end of strings in repository chooser

When selecting a local working directory for a new repository or a
location to clone an existing repository into we now set the insert
point at the end of the selected path, allowing the user to type in
any additional parts of the path if they so desire.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Avoid hardcoded Windows paths in Cygwin package files
Shawn O. Pearce [Fri, 22 Feb 2008 00:27:46 +0000 (19:27 -0500)]
git-gui: Avoid hardcoded Windows paths in Cygwin package files

When we are being built by the Cygwin package maintainers we need to
embed the POSIX path to our library files and not the Windows path.
Embedding the Windows path means all end-users who install our Cygwin
package would be required to install Cygwin at the same Windows path
as the package maintainer had Cygwin installed to.  This requirement
is simply not user-friendly and may be infeasible for a large number
of our users.

We now try to auto-detect if the Tcl/Tk binary we will use at runtime
is capable of translating POSIX paths into Windows paths the same way
that cygpath does the translations.  If the Tcl/Tk binary gives us the
same results then it understands the Cygwin path translation process
and should be able to read our library files from a POSIX path name.

If it does not give us the same answer as cygpath then the Tcl/Tk
binary might actually be a native Win32 build (one that is not
linked against Cygwin) and thus requires the native Windows path
to our library files.  We can assume this is not a Cygwin package
as the Cygwin maintainers do not currently ship a pure Win32 build
of Tcl/Tk.

Reported on the git mailing list by Jurko Gospodnetić.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Default TCL_PATH to same location as TCLTK_PATH
Shawn O. Pearce [Fri, 22 Feb 2008 00:17:27 +0000 (19:17 -0500)]
git-gui: Default TCL_PATH to same location as TCLTK_PATH

Most users set TCLTK_PATH to tell git-gui where to find wish, but they
fail to set TCL_PATH to the same Tcl installation.  We use the non-GUI
tclsh during builds so headless systems are still able to create an
index file and create message files without GNU msgfmt.  So it matters
to us that we find a working TCL_PATH at build time.

If TCL_PATH hasn't been set yet we can take a better guess about what
tclsh executable to use by replacing 'wish' in the executable path with
'tclsh'.  We only do this replacement on the filename part of the path,
just in case the string "wish" appears in the directory paths.  Most of
the time the tclsh will be installed alongside wish so this replacement
is a sensible and safe default.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Paper bag fix error dialogs opening over the main window
Shawn O. Pearce [Thu, 21 Feb 2008 17:22:08 +0000 (12:22 -0500)]
git-gui: Paper bag fix error dialogs opening over the main window

If the main window is the only toplevel we have open then we
don't have a valid grab right now, so we need to assume the
best toplevel to use for the parent is ".".

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: fix typo in lib/spellcheck.tcl
Michele Ballabio [Thu, 21 Feb 2008 14:38:56 +0000 (15:38 +0100)]
git-gui: fix typo in lib/spellcheck.tcl

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Shorten Aspell version strings to just Aspell version number
Shawn O. Pearce [Thu, 21 Feb 2008 05:20:50 +0000 (00:20 -0500)]
git-gui: Shorten Aspell version strings to just Aspell version number

We really only support Aspell, so showing the compatibility line from
ispell is of little value to end users.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Gracefully display non-aspell version errors to users
Shawn O. Pearce [Thu, 21 Feb 2008 05:17:18 +0000 (00:17 -0500)]
git-gui: Gracefully display non-aspell version errors to users

If the user has somehow managed to make us execute ispell instead
of aspell, even though our code is invoking aspell, and ispell is
not recognizing the aspell command line options we use to invoke
it then we don't want a giant usage message back from ispell.

Instead we show the ispell version number, letting the user know
we don't actually support that spell checker.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Catch and display aspell startup failures to the user
Shawn O. Pearce [Thu, 21 Feb 2008 03:34:11 +0000 (22:34 -0500)]
git-gui: Catch and display aspell startup failures to the user

If we feed a bad dictionary name to aspell on startup it may appear
to start (as Tcl found the executable in our $PATH) but it fails to
give us the version string.  In such a case the close of the pipe
will report the exit status of the process (failure) and that is
an error in Tcl.

We now trap the subprocess failure and display the stderr message
from it, letting the user know why the failure is happening.  We then
disable the spell checker, but keep our object instance so the user
can alter their preferred dictionary through the options dialog, and
possibly restart the spell checker.

I was also originally wrong to use "error" here for the display
of the problem to the user.  I meant to use "error_popup", which
will open a message box and show the failure in a GUI context,
rather than killing git-gui and showing the message on the console.

Noticed by Ilari on #git.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Only bind the spellcheck popup suggestion hook once
Shawn O. Pearce [Thu, 21 Feb 2008 02:55:43 +0000 (21:55 -0500)]
git-gui: Only bind the spellcheck popup suggestion hook once

If we reconnect to the spellchecker there is no reason to resetup
the binding for button 3 on our text widget to show the suggestion
list (if available).

Plus, by moving it out of _connect and into init we can now break
out of _connect earlier if there is something wrong with the pipe,
for example if the dictionary we were asked to load is not valid.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Remove explicit references to 'aspell' in message strings
Shawn O. Pearce [Thu, 21 Feb 2008 02:52:54 +0000 (21:52 -0500)]
git-gui: Remove explicit references to 'aspell' in message strings

Users may or may not be using aspell here.  About the only thing
we are using that is aspell specific (and not supported by ispell
or an ispell variant) is some command line options when we start
up aspell, and a forced encoding of UTF-8.  Both of these can be
corrected and/or cleaned up by users through an aspell wrapper
script, or through further improvements to git-gui.  There is no
reason to require our translated strings to reference a specific
spell checker, especially if that spell checker implementation is
not very suitable for the language being translated.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Ensure all spellchecker 'class' variables are initialized
Shawn O. Pearce [Thu, 21 Feb 2008 02:48:21 +0000 (21:48 -0500)]
git-gui: Ensure all spellchecker 'class' variables are initialized

If we somehow managed to get our spellchecker instance created but
aspell wasn't startable we may not finish _connect and thus may
find one or more of our fields was not initialized in the instance.

If we have an instance but no version, there is no reason to show
a version to the user in our about dialog.  We effectively have no
spellchecker available.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Thu, 21 Feb 2008 05:21:54 +0000 (00:21 -0500)]
Merge branch 'maint'

* maint:
  git-gui: Ensure error dialogs always appear over all other windows

16 years agogit-gui: Ensure error dialogs always appear over all other windows
Shawn O. Pearce [Thu, 21 Feb 2008 04:37:07 +0000 (23:37 -0500)]
git-gui: Ensure error dialogs always appear over all other windows

If we are opening an error dialog we want it to appear above all of
the other windows, even those that we may have opened with a grab
to make the window modal.  Failure to do so may allow an error
dialog to open up (and grab focus!) under an existing toplevel,
making the user think git-gui has frozen up and is unresponsive,
as they cannot get to the dialog.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Wed, 20 Feb 2008 05:40:13 +0000 (00:40 -0500)]
Merge branch 'maint'

* maint:
  git-gui: relax "dirty" version detection

16 years agogit-gui: relax "dirty" version detection
Wincent Colaiuta [Mon, 18 Feb 2008 08:36:33 +0000 (09:36 +0100)]
git-gui: relax "dirty" version detection

"git gui" would complain at launch if the local version of Git was
"1.5.4.2.dirty". Loosen the regular expression to look for either
"-dirty" or ".dirty", thus eliminating spurious warnings.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Update German translation.
Christian Stimming [Sat, 16 Feb 2008 20:53:23 +0000 (21:53 +0100)]
git-gui: Update German translation.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: (i18n) Add newly added translation strings to template.
Christian Stimming [Sat, 16 Feb 2008 20:56:22 +0000 (21:56 +0100)]
git-gui: (i18n) Add newly added translation strings to template.

And markup one missing string for translation.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Correct size of dictionary name widget in options dialog
Shawn O. Pearce [Thu, 14 Feb 2008 06:07:39 +0000 (01:07 -0500)]
git-gui: Correct size of dictionary name widget in options dialog

We don't need to fill this entire horizontal cavity, it looks really
bad on some platforms to stretch the widget out to fill the window.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Paper bag fix bad string length call in spellchecker
Shawn O. Pearce [Thu, 14 Feb 2008 06:05:04 +0000 (01:05 -0500)]
git-gui: Paper bag fix bad string length call in spellchecker

We don't want the list length, we need the string length.

Found due to a bad " character discovered in the text and
Tcl throwing 'unmatched open quote in list'.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Automatically spell check commit messages as the user types
Shawn O. Pearce [Thu, 7 Feb 2008 07:35:25 +0000 (02:35 -0500)]
git-gui: Automatically spell check commit messages as the user types

Many user friendly tools like word processors, email editors and web
browsers allow users to spell check the message they are writing
as they type it, making it easy to identify a common misspelling
of a word and correct it on the fly.

We now open a bi-directional pipe to Aspell and feed the message
text the user is editing off to the program about once every 300
milliseconds.  This is frequent enough that the user sees the results
almost immediately, but is not so frequent as to cause significant
additional load on the system.  If the user has modified the message
text during the last 300 milliseconds we delay until the next period,
ensuring that we avoid flooding the Aspell process with a lot of
text while the user is actively typing their message.

We wait to send the current message buffer to Aspell until the user
is at a word boundary, thus ensuring that we are not likely to ask
for misspelled word detection on a word that the user is actively
typing, as most words are misspelled when only partially typed,
even if the user has thus far typed it correctly.

Misspelled words are highlighted in red and are given an underline,
causing the word to stand out from the others in the buffer.  This is
a very common user interface idiom for displaying misspelled words,
but differs from one platform to the next in slight variations.
For example the Mac OS X system prefers using a dashed red underline,
leaving the word in the original text color.  Unfortunately the
control that Tk gives us over text display is not powerful enough
to handle such formatting so we have to work with the least common
denominator.

The top suggestions for a misspelling are saved in an array and
offered to the user when they right-click (or on the Mac ctrl-click)
a misspelled word.  Selecting an entry from this menu will replace
the misspelling with the correction shown.  Replacement is integrated
with the undo/redo stack so undoing a replacement will restore the
misspelled original text.

If Aspell could not be started during git-gui launch we silently eat
the error and run without spell checking support.  This way users
who do not have Aspell in their $PATH can continue to use git-gui,
although they will not get the advanced spelling functionality.

If Aspell started successfully the version line and language are
shown in git-gui's about box, below the Tcl/Tk versions.  This way
the user can verify the Aspell function has been activated.

If Aspell crashes while we are running we inform the user with an
error dialog and then disable Aspell entirely for the rest of this
git-gui session.  This prevents us from fork-bombing the system
with Aspell instances that always crash when presented with the
current message text, should there be a bug in either Aspell or in
git-gui's output to it.

We escape all input lines with ^, as recommended by the Aspell manual
page, as this allows Aspell to properly ignore any input line that is
otherwise looking like a command (e.g. ! to enable terse output).  By
using this escape however we need to correct all word offsets by -1 as
Aspell is apparently considering the ^ escape to be part of the line's
character count, but our Tk text widget obviously does not.

Available dictionaries are offered in the Options dialog, allowing
the user to select the language they want to spellcheck commit
messages with for the current repository, as well as the global
user setting that all repositories inherit.

Special thanks to Adam Flott for suggesting connecting git-gui
to Aspell for the purpose of spell checking the commit message,
and to Wincent Colaiuta for the idea to wait for a word boundary
before passing the message over for checking.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agoMerge branch 'maint'
Shawn O. Pearce [Tue, 12 Feb 2008 07:35:03 +0000 (02:35 -0500)]
Merge branch 'maint'

* maint:
  git-gui: support Git Gui.app under OS X 10.5

16 years agogit-gui: support Git Gui.app under OS X 10.5
Jay Soffian [Tue, 12 Feb 2008 02:33:52 +0000 (21:33 -0500)]
git-gui: support Git Gui.app under OS X 10.5

The Tk Framework moved its location in 10.5 compared to 10.4

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Tested-by: Seth Falcon <seth@userprimary.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Update German translation.
Christian Stimming [Sat, 2 Feb 2008 09:18:27 +0000 (10:18 +0100)]
git-gui: Update German translation.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: (i18n) Fix a bunch of still untranslated strings.
Christian Stimming [Sat, 2 Feb 2008 09:20:17 +0000 (10:20 +0100)]
git-gui: (i18n) Fix a bunch of still untranslated strings.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Correctly cleanup msgfmt '1 message untranslated' output gitgui-0.9.2
Shawn O. Pearce [Wed, 23 Jan 2008 04:56:15 +0000 (23:56 -0500)]
git-gui: Correctly cleanup msgfmt '1 message untranslated' output

In the multiple message case we remove the word "messages" from the
statistics output of msgfmt as it looks cleaner on the tty when you
are watching the build process.  However we failed to strip the word
"message" when only 1 message was found to be untranslated or fuzzy,
as msgfmt does not produce the 's' suffix.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Make the statistics of po2msg match those of msgfmt
Shawn O. Pearce [Wed, 23 Jan 2008 04:52:07 +0000 (23:52 -0500)]
git-gui: Make the statistics of po2msg match those of msgfmt

The strings we were showing from po2msg didn't exactly match those
of msgfmt's --statistics output so we didn't show quite the same
results when building git-gui's message files.  Now we're closer
to what msgfmt shows (at least for an en_US locale) so the make
output matches.

I noticed that the fuzzy translation count is off by one for the
current po/zh_cn.po file.  Not sure why and I'm not going to try
and debug it at this time as the po2msg is strictly a fallback,
users building from source really should prefer msgfmt.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Fallback to Tcl based po2msg.sh if msgfmt isn't available
Shawn O. Pearce [Wed, 23 Jan 2008 04:44:36 +0000 (23:44 -0500)]
git-gui: Fallback to Tcl based po2msg.sh if msgfmt isn't available

If msgfmt fails with exit code 127 that typically means the program
is not found in the user's PATH and thus cannot be executed by make.
In such a case we can try to fallback to the Tcl based po2msg program
that we distributed with git-gui, as it does a "good enough" job.

We still don't default to po2msg.sh however as it does not perform
a lot of the sanity checks that msgfmt does, and quite a few of
those are too useful to give up.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Work around random missing scrollbar in revision list
Shawn O. Pearce [Tue, 22 Jan 2008 15:40:13 +0000 (10:40 -0500)]
git-gui: Work around random missing scrollbar in revision list

If the horizontal scrollbar isn't currently visible (because it has
not been needed) but we get an update to the scroll port we may find
the scrollbar window exists but the Tcl command doesn't.  Apparently
it is possible for Tk to have partially destroyed the scrollbar by
removing the Tcl procedure name but still leaving the widget name in
the window registry.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Correct encoding of glossary/fr.po to UTF-8
Shawn O. Pearce [Mon, 21 Jan 2008 04:03:23 +0000 (23:03 -0500)]
git-gui: Correct encoding of glossary/fr.po to UTF-8

Junio noticed this was incorrectly added in ISO-8859-1 but it should
be in UTF-8 (as the headers claim UTF-8, and our convention is to use
only UTF-8).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Consolidate hook execution code into a single function
Shawn O. Pearce [Sun, 20 Jan 2008 19:46:59 +0000 (14:46 -0500)]
git-gui: Consolidate hook execution code into a single function

The code we use to test if a hook is executable or not differs on
Cygwin from the normal POSIX case.  Rather then repeating that for
all three hooks we call in our commit code path we can place the
common logic into a global procedure and invoke it when necessary.

This also lets us get rid of the ugly "|& cat" we were using before
as we can now rely on the Tcl 8.4 feature of "2>@1" or fallback to
the "|& cat" when necessary.

The post-commit hook is now run through the same API, but its outcome
does not influence the commit status.  As a result we now show any of
the errors from the post-commit hook in a dialog window, instead of on
the user's tty that was used to launch git-gui.  This resolves a long
standing bug related to not getting errors out of the post-commit hook
when launched under git-gui.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Correct window title for hook failure dialogs
Shawn O. Pearce [Sun, 20 Jan 2008 19:43:38 +0000 (14:43 -0500)]
git-gui: Correct window title for hook failure dialogs

During i18n translation work this message was partially broken
by using "append" instead of "strcat" to join the two different
parts of the message together.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Honor the standard commit-msg hook
Shawn O. Pearce [Sun, 20 Jan 2008 19:11:52 +0000 (14:11 -0500)]
git-gui: Honor the standard commit-msg hook

Under core Git the git-commit tool will invoke the commit-msg hook
if it exists and is executable to the user running git-commit.  As
a hook it has some limited value as it cannot alter the commit, but
it can modify the message the user is attempting to commit.  It is
also able to examine the message to ensure it conforms to some local
standards/conventions.

Since the hook takes the name of a temporary file holding the message
as its only parameter we need to move the code that creates the temp
file up earlier in our commit code path, and then pass through that
file name to the latest stage (where we call git-commit-tree).  We let
the hook alter the file as it sees fit and we don't bother to look at
its content again until the commit succeeded and we need the subject
for the reflog update.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Makefile - Handle $DESTDIR on Cygwin
Mark Levedahl [Fri, 18 Jan 2008 03:50:23 +0000 (22:50 -0500)]
git-gui: Makefile - Handle $DESTDIR on Cygwin

gg_libdir is converted to an absolute Windows path on Cygwin,
but a later step attempts to prefix $DESTDIR to install to a
staging directory. Explicitly separate the uses of gg_libdir for
these two purposes so installation to $DESTDIR will work.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: add french glossary: glossary/fr.po
Christian Couder [Wed, 16 Jan 2008 07:19:34 +0000 (08:19 +0100)]
git-gui: add french glossary: glossary/fr.po

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Refresh file status description after hunk application
Shawn O. Pearce [Wed, 16 Jan 2008 06:29:39 +0000 (01:29 -0500)]
git-gui: Refresh file status description after hunk application

If we apply a hunk in either direction this may change the file's
status.  For example if a file is completely unstaged, and has at
least two hunks in it and the user stages one hunk the file will
change from "Modified, not staged" to "Portions staged for commit".

Resetting the file path causes our trace on this variable to fire;
that trace is used to update the file header in the diff viewer to
the file's current status.

Noticed by Johannes Sixt.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Allow 'Create New Repository' on existing directories
Shawn O. Pearce [Wed, 16 Jan 2008 06:14:42 +0000 (01:14 -0500)]
git-gui: Allow 'Create New Repository' on existing directories

Often users setup a few source files and get a project rolling
before they create a Git repository for it.  In such cases the
core Git tools allow users to initialize a new repository by
simply running `git init` at the desired root level directory.

We need to allow the same situation in git-gui; if the user is
trying to make a new repository we should let them do that to any
location they chose.  If the directory already exists and already
has files contained within it we still should allow the user to
create a repository there.  However we still need to disallow
creating a repository on top of an existing repository.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
16 years agogit-gui: Initial french translation
Christian Couder [Wed, 16 Jan 2008 05:51:40 +0000 (00:51 -0500)]
git-gui: Initial french translation

Here are some of the choices made to translate Git Gui to french:

- commit         -> "commit" (noun) or "commiter" (verb)
- stage (index)  -> "pré-commit" (noun) or "pré-commiter" (verb)
- (re)scan       -> "(re)synchroniser"
- reset          -> "réinitialiser"
- checkout       -> "emprunt" (noun) or "emprunter" (verb)
- revision expression -> "expression de révison"

I am not completely happy with these, but it's a start...

[sp: Inserted a missing LF in message on line 466]

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>