1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 08:47:56 +01:00
Commit graph

726 commits

Author SHA1 Message Date
Shawn O. Pearce
ed76cb70f4 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>
2008-01-20 22:45:38 -05:00
Shawn O. Pearce
c87238e19d 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>
2008-01-20 22:45:37 -05:00
Shawn O. Pearce
fb0ca475c6 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>
2008-01-20 22:45:37 -05:00
Mark Levedahl
a028557113 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>
2008-01-17 22:58:24 -05:00
Christian Couder
a1f8f5043c 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>
2008-01-17 21:35:01 -05:00
Shawn O. Pearce
a41e45ea1c 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>
2008-01-16 01:29:39 -05:00
Shawn O. Pearce
d36a8f73a4 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>
2008-01-16 01:14:42 -05:00
Christian Couder
daaa958fcc 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>
2008-01-16 01:01:19 -05:00
Christian Stimming
d71b5659c5 git-gui: Improve German translation.
Change translation of "clone" back to "klonen" because "kopieren" is a
much broader term than this particular git action.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-01-16 00:50:20 -05:00
Peter Karlsson
10899a84d1 git-gui: Updated Swedish translation after mailing list review.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-01-16 00:50:10 -05:00
Christian Stimming
d454460151 git-gui: Fix broken revert confirmation.
I broke this extremely cool feature in 1ac17950,
but it is rather easy to fix this. Sorry for that.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-01-16 00:44:14 -05:00
Christian Stimming
898ff9e9b4 git-gui: Update German translation
"revert" translated as "verwerfen".
"hunk" translated as "Kontext".
Several menu items reworded to be shorter.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-01-16 00:42:41 -05:00
Christian Stimming
b3125ad3c1 git-gui: Update glossary: add term "hunk"
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-01-16 00:42:37 -05:00
Bernt Hansen
a6d5888fa1 git-gui: Make commit log messages end with a newline
Concatenating commit log messages from multiple commits works better
when all of the commits end with a clean line break.

Its good to be strict in what you create, and lenient in what you
accept, and since we're creating here, we should always try to
Do The Right Thing(tm).

Signed-off-by: Bernt Hansen <bernt@alumni.uwaterloo.ca>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-29 21:03:55 -05:00
Peter Karlsson
f0e8692a09 Added Swedish translation. 2007-12-29 21:00:14 -05:00
Mark Levedahl
9fe98116a2 git-gui: Unconditionally use absolute paths with Cygwin
The mapping of Windows vs Cygwin/Posix paths is arbitrary and not knowable
from the Posix side, so logic to determine whether to use relative paths
to locate the git-gui library just does not work on Cygwin. Fix this to
unconditionally use absolute path on Cygwin. (This fixes a regression
from 1.5.4).

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-14 01:51:37 -05:00
Shawn O. Pearce
a4750dd266 git-gui: Handle file mode changes (644->755) in diff viewer
Johannes Sixt pointed out the diff headers "old mode ..." and
"new mode ..." were not being parsed properly by git-gui.  We
now include them in the diff viewer for a file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-14 01:51:22 -05:00
Johannes Sixt
fba6072ed8 git-gui: Move frequently used commands to the top of the context menu.
"Stage/Unstage Hunk" is probably the most frequently used command of the
patch context menu *and* it is not available in some other form than
the context menu. Therefore, it should go to the top. "Less Context" and
"More Context" entries are also not easily available otherwise, and are
therefore, moved second. The other entries are available via key strokes
(Copy, Paste, Refresh) or rarly used (Font Size, Options) and can go last.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-14 01:30:20 -05:00
Miklos Vajna
cfb5e10442 Update Hungarian translation. 100% completed.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-05 18:55:25 -05:00
しらいしななこ
e360bebf71 Update ja.po for git-gui
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-05 18:54:10 -05:00
Johannes Sixt
cbd9ac9a71 git-gui: Improve the application icon on Windows.
Previusly, there was only a 16x16 image, which looked very distorted.
Here we add a 32x32 version, and also make the image sharper.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-02 23:05:10 -05:00
Robert Schiele
74521eee4c git-gui: install-sh from automake does not like -m755
The install-sh script as shipped with automake requires a space between
the -m switch and its argument.  Since this is also the regular way of
doing it with other install implementations this change inserts the
missing space.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-02 23:04:02 -05:00
brian m. carlson
5405110200 git-gui: Reorder msgfmt command-line arguments
Any program using getopt or getopt_long will stop processing options
once a non-option argument has been encountered, if POSIXLY_CORRECT is
set.  Therefore, reorder the command-line arguments to put options
first, so that the msgfmt call works in this scenario.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.ath.cx>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-12-02 22:49:36 -05:00
Christian Stimming
6f4ec3aa29 Update German translation. 100% completed.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-26 21:09:52 -05:00
Christian Stimming
aa7db34778 Update git-gui.pot with latest (few) string additions and changes.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-26 21:09:47 -05:00
Michele Ballabio
b53a191901 git-gui: update it.po and glossary/it.po
Updates and fixes:
 * current -> attuale
 * failed -> impossibile/non riuscito
 * corrupt -> danneggiato

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-22 16:04:10 -05:00
Michele Ballabio
208320de80 git-gui: fix a typo in lib/commit.tcl
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-22 16:02:09 -05:00
Shawn O. Pearce
41188dd1a8 git-gui 0.9.0
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-21 02:10:03 -05:00
Shawn O. Pearce
cd16a6c929 git-gui: Bind Meta-T for "Stage To Commit" menu action
Aaron Digulla suggested we bind Ctrl-T or Cmd-T to "Stage To Commit"
menu action so it can be easily accessed from the keyboard.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-08 02:22:21 -05:00
Shawn O. Pearce
48b8d2b379 git-gui: Allow users to set font weights to bold
Previously we allowed users to tweak their font weight to be bold by
setting it manually in their ~/.gitconfig prior to starting git-gui.
This was broken in ae0754ac9a when
Simon set the font weight to normal by default, overridding whatever
we found from the ~/.gitconfig file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01 00:31:36 -04:00
Junio C Hamano
6ea10797de git-gui: Update Japanese strings (part 2)
Resolve an earlier suggestion from Christian.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01 00:17:25 -04:00
しらいしななこ
76d536b8af git-gui: Update Japanese strings
This updates the Japanese translation file.

Signed-off-by: しらいしななこ <nanako3@bluebottle.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01 00:06:43 -04:00
Alex Riesen
efb848666c Updated russian translation of git-gui
Fixed some spelling mistakes.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01 00:05:06 -04:00
Johannes Schindelin
95a8b67c26 po2msg: actually output statistics
The "--statistics" option was ignored so far; no longer.  Now we have
a message similar to that of msgfmt.  (Untranslated, though ;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01 00:03:24 -04:00
Johannes Schindelin
9a25ae82dd po2msg: ignore untranslated messages
Do not generate translations when the translated message is empty.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01 00:00:31 -04:00
Johannes Schindelin
f94872dfc1 po2msg: ignore entries marked with "fuzzy"
As Christian Stimming pointed out, entries which are "fuzzy" need to
be checked by human translators, and cannot be used.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-01 00:00:30 -04:00
Shawn O. Pearce
ab0d33c438 git-gui: Protect against bad translation strings
If a translation string uses a format character we don't have an
argument for then it may throw an error when we attempt to format
the translation.  In this case switch back to the default format
that comes with the program (aka the English translation).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-26 03:08:37 -04:00
Shawn O. Pearce
f4e9996b77 Merge branch 'maint'
* maint:
  git-gui: Make sure we get errors from git-update-index

Conflicts:

	lib/index.tcl
2007-10-23 18:50:19 -04:00
Shawn O. Pearce
d4e890e5de git-gui: Make sure we get errors from git-update-index
I'm seeing a lot of silent failures from git-update-index on
Windows and this is leaving the index.lock file intact, which
means users are later unable to perform additional operations.

When the index is locked behind our back and we are unable to
use it we may need to allow the user to delete the index lock
and try again.  However our UI state is probably not currect
as we have assumed that some changes were applied but none of
them actually did.  A rescan is the easiest (in code anyway)
solution to correct our UI to show what the index really has
(or doesn't have).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-23 18:49:27 -04:00
Alex Riesen
dec2b4aaa8 More updates and corrections to the russian translation of git-gui
In particular many screw-ups after po regeneration were fixed.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-23 00:28:35 -04:00
Kirill
c43ff43601 Updated Russian translation.
The most important changes are:
- Git version cannot be determined... (lost in 57364320bf)
- git-gui: fatal error

Some changes need the second opinion (search for TOVERIFY), some changes are just copies (search for "carbon copy").

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-22 00:03:42 -04:00
Christian Stimming
9d434d5026 git-gui: Update German translation
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-20 20:45:11 -04:00
Christian Stimming
fb6cf213a3 git-gui: Add more terms to glossary.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-20 20:45:10 -04:00
Shawn O. Pearce
c9dcc7f865 Merge branch 'maint'
* maint:
  git-gui: Don't display CR within console windows
  git-gui: Handle progress bars from newer gits
  git-gui: Correctly report failures from git-write-tree

Conflicts:

	lib/commit.tcl
	lib/console.tcl
2007-10-20 20:43:36 -04:00
Shawn O. Pearce
bbbadf6e58 git-gui: Don't display CR within console windows
Git progress bars from tools like git-push and git-fetch use CR
to skip back to the start of the current line and redraw it with
an updated progress.  We were doing this in our Tk widget but had
failed to skip the CR, which Tk doesn't draw well.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-20 20:42:01 -04:00
Shawn O. Pearce
bea6878be2 git-gui: Handle progress bars from newer gits
Post Git 1.5.3 a new style progress bar has been introduced that
uses only one line rather than two.  The formatting of the completed
and total section is also slightly different so we must adjust our
regexp to match.  Unfortunately both styles are in active use by
different versions of Git so we need to look for both.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-20 20:36:27 -04:00
Shawn O. Pearce
8af52d7a83 git-gui: Correctly report failures from git-write-tree
If git-write-tree fails (such as if the index file is currently
locked and it wants to write to it) we were not getting the error
message as $tree_id was always the empty string so we shortcut
through the catch and never got the output from stderr.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-20 01:42:01 -04:00
Shawn O. Pearce
a5bb31fb63 git-gui: Paper bag fix the global config parsing
git-config won't honor any options after --list.  We must supply
the --global option in front of --list if we really want to load
the global configuration options.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-17 03:38:00 -04:00
Shawn O. Pearce
8621581248 git-gui: Honor a config.mak in git-gui's top level
I keep forgetting to include TCLTK_PATH when I build git-gui on some
systems.  Placing that rule (among others) into a config.mak makes it
easier to compile the application the same way every time.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-13 22:14:14 -04:00
Shawn O. Pearce
82dd4e0465 git-gui: Collapse $env(HOME) to ~/ in recent repositories on Windows
Apparently native Tcl/Tk on Windows is using \ as the return value
from [file separator] but [file normalize] on that same system is
using / rather than \ to represent a directory separator.  I really
think that is nuts, but its what is happening.

So we can actually just hardcode our separator to / as all systems
we support (Windows, Mac OS X, UNIX) use /.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-12 23:07:59 -04:00