Skip to content

Commit 144126a

Browse files
committed
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui: Make commit log messages end with a newline Added Swedish translation. git-gui: Unconditionally use absolute paths with Cygwin git-gui: Handle file mode changes (644->755) in diff viewer git-gui: Move frequently used commands to the top of the context menu.
2 parents cf9d58e + a6d5888 commit 144126a

File tree

5 files changed

+1922
-28
lines changed

5 files changed

+1922
-28
lines changed

git-gui/Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,12 @@ GITGUI_SCRIPT := $$0
117117
GITGUI_RELATIVE :=
118118
GITGUI_MACOSXAPP :=
119119

120-
ifeq ($(exedir),$(gg_libdir))
121-
GITGUI_RELATIVE := 1
122-
endif
123-
124120
ifeq ($(uname_O),Cygwin)
125121
GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
126-
ifeq ($(GITGUI_RELATIVE),)
127-
gg_libdir := $(shell cygpath --windows --absolute "$(gg_libdir)")
122+
gg_libdir := $(shell cygpath --windows --absolute "$(gg_libdir)")
123+
else
124+
ifeq ($(exedir),$(gg_libdir))
125+
GITGUI_RELATIVE := 1
128126
endif
129127
endif
130128
ifeq ($(uname_S),Darwin)

git-gui/git-gui.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,27 @@ $ui_diff tag raise sel
25412541
#
25422542
set ctxm .vpane.lower.diff.body.ctxm
25432543
menu $ctxm -tearoff 0
2544+
$ctxm add command \
2545+
-label [mc "Apply/Reverse Hunk"] \
2546+
-command {apply_hunk $cursorX $cursorY}
2547+
set ui_diff_applyhunk [$ctxm index last]
2548+
lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
2549+
$ctxm add separator
2550+
$ctxm add command \
2551+
-label [mc "Show Less Context"] \
2552+
-command {if {$repo_config(gui.diffcontext) >= 1} {
2553+
incr repo_config(gui.diffcontext) -1
2554+
reshow_diff
2555+
}}
2556+
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
2557+
$ctxm add command \
2558+
-label [mc "Show More Context"] \
2559+
-command {if {$repo_config(gui.diffcontext) < 99} {
2560+
incr repo_config(gui.diffcontext)
2561+
reshow_diff
2562+
}}
2563+
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
2564+
$ctxm add separator
25442565
$ctxm add command \
25452566
-label [mc Refresh] \
25462567
-command reshow_diff
@@ -2562,12 +2583,6 @@ $ctxm add command \
25622583
}
25632584
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
25642585
$ctxm add separator
2565-
$ctxm add command \
2566-
-label [mc "Apply/Reverse Hunk"] \
2567-
-command {apply_hunk $cursorX $cursorY}
2568-
set ui_diff_applyhunk [$ctxm index last]
2569-
lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
2570-
$ctxm add separator
25712586
$ctxm add command \
25722587
-label [mc "Decrease Font Size"] \
25732588
-command {incr_font_size font_diff -1}
@@ -2577,21 +2592,6 @@ $ctxm add command \
25772592
-command {incr_font_size font_diff 1}
25782593
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
25792594
$ctxm add separator
2580-
$ctxm add command \
2581-
-label [mc "Show Less Context"] \
2582-
-command {if {$repo_config(gui.diffcontext) >= 1} {
2583-
incr repo_config(gui.diffcontext) -1
2584-
reshow_diff
2585-
}}
2586-
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
2587-
$ctxm add command \
2588-
-label [mc "Show More Context"] \
2589-
-command {if {$repo_config(gui.diffcontext) < 99} {
2590-
incr repo_config(gui.diffcontext)
2591-
reshow_diff
2592-
}}
2593-
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
2594-
$ctxm add separator
25952595
$ctxm add command -label [mc "Options..."] \
25962596
-command do_options
25972597
proc popup_diff_menu {ctxm x y X Y} {

git-gui/lib/commit.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ A rescan will be automatically started now.
303303
puts stderr [mc "warning: Tcl does not support encoding '%s'." $enc]
304304
fconfigure $msg_wt -encoding utf-8
305305
}
306-
puts -nonewline $msg_wt $msg
306+
puts $msg_wt $msg
307307
close $msg_wt
308308

309309
# -- Create the commit.

git-gui/lib/diff.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ proc read_diff {fd} {
220220

221221
if {[string match {mode *} $line]
222222
|| [string match {new file *} $line]
223+
|| [regexp {^(old|new) mode *} $line]
223224
|| [string match {deleted file *} $line]
224225
|| [string match {deleted symlink} $line]
225226
|| [string match {Binary files * and * differ} $line]

0 commit comments

Comments
 (0)