Skip to content

Commit fb7dfaa

Browse files
committed
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>
2 parents 0dbd812 + 8a383db commit fb7dfaa

File tree

8 files changed

+40
-22
lines changed

8 files changed

+40
-22
lines changed

git-gui/GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
GVF=GIT-VERSION-FILE
4-
DEF_VER=0.17.GITGUI
4+
DEF_VER=0.18.GITGUI
55

66
LF='
77
'

git-gui/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ lib/tclIndex: $(ALL_LIBFILES) GIT-GUI-VARS
254254
auto_mkindex lib '*.tcl' \
255255
| $(TCL_PATH) $(QUIET_2DEVNULL); then : ok; \
256256
else \
257-
echo 1>&2 " * $(TCL_PATH) failed; using unoptimized loading"; \
257+
echo >&2 " * $(TCL_PATH) failed; using unoptimized loading"; \
258258
rm -f $@ ; \
259259
echo '# Autogenerated by git-gui Makefile' >$@ && \
260260
echo >>$@ && \
@@ -274,8 +274,8 @@ TRACK_VARS = \
274274
GIT-GUI-VARS: FORCE
275275
@VARS='$(TRACK_VARS)'; \
276276
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
277-
echo 1>&2 " * new locations or Tcl/Tk interpreter"; \
278-
echo 1>$@ "$$VARS"; \
277+
echo >&2 " * new locations or Tcl/Tk interpreter"; \
278+
echo >$@ "$$VARS"; \
279279
fi
280280

281281
ifdef GITGUI_MACOSXAPP

git-gui/git-gui.sh

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,20 @@ proc strcat {args} {
135135
::msgcat::mcload $oguimsg
136136
unset oguimsg
137137

138+
######################################################################
139+
##
140+
## On Mac, bring the current Wish process window to front
141+
142+
if {[tk windowingsystem] eq "aqua"} {
143+
catch {
144+
exec osascript -e [format {
145+
tell application "System Events"
146+
set frontmost of processes whose unix id is %d to true
147+
end tell
148+
} [pid]]
149+
}
150+
}
151+
138152
######################################################################
139153
##
140154
## read only globals
@@ -3003,18 +3017,11 @@ blame {
30033017
set jump_spec {}
30043018
set is_path 0
30053019
foreach a $argv {
3006-
if {[file exists $a]} {
3007-
if {$path ne {}} usage
3008-
set path [normalize_relpath $a]
3009-
break
3010-
} elseif {[file exists $_prefix$a]} {
3011-
if {$path ne {}} usage
3012-
set path [normalize_relpath $_prefix$a]
3013-
break
3014-
}
3020+
set p [file join $_prefix $a]
30153021
3016-
if {$is_path} {
3022+
if {$is_path || [file exists $p]} {
30173023
if {$path ne {}} usage
3024+
set path [normalize_relpath $p]
30183025
break
30193026
} elseif {$a eq {--}} {
30203027
if {$path ne {}} {

git-gui/lib/choose_repository.tcl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ method _next {action} {
286286
destroy $w_body
287287
if {![winfo exists $w_next]} {
288288
${NS}::button $w_next -default active
289-
pack $w_next -side right -padx 5 -before $w_quit
289+
set pos -before
290+
if {[tk windowingsystem] eq "win32"} { set pos -after }
291+
pack $w_next -side right -padx 5 $pos $w_quit
290292
}
291293
_do_$action $this
292294
}

git-gui/lib/diff.tcl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,15 @@ proc apply_range_or_line {x y} {
764764
# context line
765765
set ln [$ui_diff get $i_l $next_l]
766766
set patch "$patch$pre_context$ln"
767-
set n [expr $n+1]
768-
set m [expr $m+1]
767+
# Skip the "\ No newline at end of
768+
# file". Depending on the locale setting
769+
# we don't know what this line looks
770+
# like exactly. The only thing we do
771+
# know is that it starts with "\ "
772+
if {![string match {\\ *} $ln]} {
773+
set n [expr $n+1]
774+
set m [expr $m+1]
775+
}
769776
set pre_context {}
770777
} elseif {$c1 eq $to_context} {
771778
# turn change line into context line

git-gui/lib/mergetool.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ proc merge_resolve_tool2 {} {
189189
}
190190
bc3 {
191191
if {$base_stage ne {}} {
192-
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" -mergeoutput="$MERGED"]
192+
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" "-mergeoutput=$MERGED"]
193193
} else {
194-
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" -mergeoutput="$MERGED"]
194+
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "-mergeoutput=$MERGED"]
195195
}
196196
}
197197
ecmerge {

git-gui/lib/remote.tcl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ proc update_all_remotes_menu_entry {} {
245245
set prune_m $remote_m.prune
246246
if {$have_remote > 1} {
247247
make_sure_remote_submenues_exist $remote_m
248-
if {[$fetch_m entrycget end -label] ne "All"} {
248+
if {[$fetch_m type end] eq "command" \
249+
&& [$fetch_m entrycget end -label] ne "All"} {
249250

250251
$fetch_m insert end separator
251252
$fetch_m insert end command \
@@ -259,7 +260,8 @@ proc update_all_remotes_menu_entry {} {
259260
}
260261
} else {
261262
if {[winfo exists $fetch_m]} {
262-
if {[$fetch_m entrycget end -label] eq "All"} {
263+
if {[$fetch_m type end] eq "command" \
264+
&& [$fetch_m entrycget end -label] eq "All"} {
263265

264266
delete_from_menu $fetch_m end
265267
delete_from_menu $fetch_m end

git-gui/po/fr.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ msgstr "Standard (rapide, semi-redondant, liens durs)"
11391139

11401140
#: lib/choose_repository.tcl:514
11411141
msgid "Full Copy (Slower, Redundant Backup)"
1142-
msgstr "Copy complète (plus lent, sauvegarde redondante)"
1142+
msgstr "Copie complète (plus lent, sauvegarde redondante)"
11431143

11441144
#: lib/choose_repository.tcl:520
11451145
msgid "Shared (Fastest, Not Recommended, No Backup)"

0 commit comments

Comments
 (0)