Merge branch 'patches' into pu

This commit is contained in:
Pat Thoyts 2016-10-03 23:28:57 +01:00
commit 408c2120e0
4 changed files with 10 additions and 2 deletions

View File

@ -1616,11 +1616,13 @@ proc run_prepare_commit_msg_hook {} {
if {[file isfile [gitdir MERGE_MSG]]} { if {[file isfile [gitdir MERGE_MSG]]} {
set pcm_source "merge" set pcm_source "merge"
set fd_mm [open [gitdir MERGE_MSG] r] set fd_mm [open [gitdir MERGE_MSG] r]
fconfigure $fd_mm -encoding utf-8
puts -nonewline $fd_pcm [read $fd_mm] puts -nonewline $fd_pcm [read $fd_mm]
close $fd_mm close $fd_mm
} elseif {[file isfile [gitdir SQUASH_MSG]]} { } elseif {[file isfile [gitdir SQUASH_MSG]]} {
set pcm_source "squash" set pcm_source "squash"
set fd_sm [open [gitdir SQUASH_MSG] r] set fd_sm [open [gitdir SQUASH_MSG] r]
fconfigure $fd_sm -encoding utf-8
puts -nonewline $fd_pcm [read $fd_sm] puts -nonewline $fd_pcm [read $fd_sm]
close $fd_sm close $fd_sm
} else { } else {

View File

@ -127,6 +127,9 @@ proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {
} else { } else {
start_show_diff $cont_info start_show_diff $cont_info
} }
global current_diff_path selected_paths
set selected_paths($current_diff_path) 1
} }
proc show_unmerged_diff {cont_info} { proc show_unmerged_diff {cont_info} {

View File

@ -69,6 +69,7 @@ proc tools_populate_one {fullname} {
proc tools_exec {fullname} { proc tools_exec {fullname} {
global repo_config env current_diff_path global repo_config env current_diff_path
global current_branch is_detached global current_branch is_detached
global selected_paths
if {[is_config_true "guitool.$fullname.needsfile"]} { if {[is_config_true "guitool.$fullname.needsfile"]} {
if {$current_diff_path eq {}} { if {$current_diff_path eq {}} {
@ -100,6 +101,7 @@ proc tools_exec {fullname} {
set env(GIT_GUITOOL) $fullname set env(GIT_GUITOOL) $fullname
set env(FILENAME) $current_diff_path set env(FILENAME) $current_diff_path
set env(FILENAMES) [join [array names selected_paths] \n]
if {$is_detached} { if {$is_detached} {
set env(CUR_BRANCH) "" set env(CUR_BRANCH) ""
} else { } else {
@ -121,6 +123,7 @@ proc tools_exec {fullname} {
unset env(GIT_GUITOOL) unset env(GIT_GUITOOL)
unset env(FILENAME) unset env(FILENAME)
unset env(FILENAMES)
unset env(CUR_BRANCH) unset env(CUR_BRANCH)
catch { unset env(ARGS) } catch { unset env(ARGS) }
catch { unset env(REVISION) } catch { unset env(REVISION) }

View File

@ -11,7 +11,7 @@
if [ $# -eq 0 ] if [ $# -eq 0 ]
then then
cat <<! cat <<!
Usage: `basename $0` git-gui-glossary.txt > git-gui-glossary.pot Usage: $(basename $0) git-gui-glossary.txt > git-gui-glossary.pot
! !
exit 1; exit 1;
fi fi
@ -33,7 +33,7 @@ cat <<!
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: `date +'%Y-%m-%d %H:%M%z'`\n" "POT-Creation-Date: $(date +'%Y-%m-%d %H:%M%z')\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"