git-gui: Fix parsing of <rev> <path-which-not-present-in-worktree>

Commit e3d06ca9 (git-gui: Detect full path when parsing arguments) broke

    git gui blame rev path-not-present-in-worktree

in particular this does not work anymore:

    # in linux.git
    $ git gui blame 2bb8c26242c2393b097a993ffe9b003ec9b85395 drivers/net/sky2.c

This patch restores the original functionality in this case.

Acked-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
French translation: copy -> copie.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Makefile: replace "echo 1>..." with "echo >..."

This is clearer to many people this way.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: fix the mergetool launcher for the Beyond Compare tool.

When using Beyond Compare as the mergetool it fails to save the merged
result correctly due to a quoting problem when executing the tool.
This patch solves the quoting problem.

Signed-off-by: Warren Falk <warren@warrenfalk.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: allow "\ No newline at end of file" for linewise staging

Counting of lines did not skip this line when generating the hunk
header.

Acked-by: Tobias Preuss <tobias.preuss@googlemail.com>
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: change dialog button positions for Windows to suit platform.

On windows it is more common to have cancel furthest on the right.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: bring wish process to front on Mac

On Mac OS X, any application that is started from the Terminal will open
behind all running applications; as a work-around, manually bring ourselves
to the front. (Stolen from gitk, commit 76bf6ff93e.)

We do this as the very first thing, so that any message boxes that might pop
up during the rest of the startup sequence are actually seen by the user.

[PT: added catch and moved down to ensure Tk has been loaded]

Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: fix file name handling with non-empty prefix

Commit e3d06ca (git-gui: Detect full path when parsing arguments -
2012-10-02) fixed the handling of absolute paths passed to the browser
and blame subcommands by checking whether the file exists without the
prefix before prepending the prefix and checking again.  Since we have
chdir'd to the top level of the working tree before doing this, this
does not work if a file with the same name exists in a subdirectory and
at the top level (for example Makefile in git.git's t/ directory).

Instead of doing this, revert that patch and fix absolute path issue by
using "file join" to prepend the prefix to the supplied path.  This will
correctly handle absolute paths by skipping the prefix in that case.

Acked-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: avoid an error message when removing the last remote

When the last remote is removed on a system that has tearoff menu items
the code that adjusts the fetch and prune menus may raise an error when
probing the menu entry for a non-existing -label option.
Check the entry type to avoid this fault.

Reported-by: Vedran Miletić <rivanvx@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui 0.18

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Merge tag 'gitgui-0.18.0' of git://repo.or.cz/git-gui

git-gui 0.18.0

* tag 'gitgui-0.18.0' of git://repo.or.cz/git-gui:
  git-gui 0.18
  git-gui: avoid an error message when removing the last remote
  git-gui: fix file name handling with non-empty prefix
  git-gui: bring wish process to front on Mac
  git-gui: change dialog button positions for Windows to suit platform.
  git-gui: allow "\ No newline at end of file" for linewise staging
  git-gui: fix the mergetool launcher for the Beyond Compare tool.
  Makefile: replace "echo 1>..." with "echo >..."
  French translation: copy -> copie.
  git-gui: Fix parsing of <rev> <path-which-not-present-in-worktree>