summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2016-10-03 23:28:57 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2016-10-03 23:28:57 +0100
commit408c2120e02cf2a96cd44c69fe3baf406d4de157 (patch)
tree39bbc79808622e6aa3a16f0437e2bc2b39881ec7
parent64c6b4c507c0295dbd54b0981510a5a8fff71947 (diff)
parenta0a0c6838744ce51bcbb634f459e173e8be59c22 (diff)
downloadgit-408c2120e02cf2a96cd44c69fe3baf406d4de157.tar.gz
Merge branch 'patches' into pu
-rwxr-xr-xgit-gui.sh2
-rw-r--r--lib/diff.tcl3
-rw-r--r--lib/tools.tcl3
-rwxr-xr-xpo/glossary/txt-to-pot.sh4
4 files changed, 10 insertions, 2 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 11048c7a0e..1ed51857e9 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1616,11 +1616,13 @@ proc run_prepare_commit_msg_hook {} {
if {[file isfile [gitdir MERGE_MSG]]} {
set pcm_source "merge"
set fd_mm [open [gitdir MERGE_MSG] r]
+ fconfigure $fd_mm -encoding utf-8
puts -nonewline $fd_pcm [read $fd_mm]
close $fd_mm
} elseif {[file isfile [gitdir SQUASH_MSG]]} {
set pcm_source "squash"
set fd_sm [open [gitdir SQUASH_MSG] r]
+ fconfigure $fd_sm -encoding utf-8
puts -nonewline $fd_pcm [read $fd_sm]
close $fd_sm
} else {
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 0d56986215..30bdd691ee 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -127,6 +127,9 @@ proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {
} else {
start_show_diff $cont_info
}
+
+ global current_diff_path selected_paths
+ set selected_paths($current_diff_path) 1
}
proc show_unmerged_diff {cont_info} {
diff --git a/lib/tools.tcl b/lib/tools.tcl
index 6ec94113db..413f1a1700 100644
--- a/lib/tools.tcl
+++ b/lib/tools.tcl
@@ -69,6 +69,7 @@ proc tools_populate_one {fullname} {
proc tools_exec {fullname} {
global repo_config env current_diff_path
global current_branch is_detached
+ global selected_paths
if {[is_config_true "guitool.$fullname.needsfile"]} {
if {$current_diff_path eq {}} {
@@ -100,6 +101,7 @@ proc tools_exec {fullname} {
set env(GIT_GUITOOL) $fullname
set env(FILENAME) $current_diff_path
+ set env(FILENAMES) [join [array names selected_paths] \n]
if {$is_detached} {
set env(CUR_BRANCH) ""
} else {
@@ -121,6 +123,7 @@ proc tools_exec {fullname} {
unset env(GIT_GUITOOL)
unset env(FILENAME)
+ unset env(FILENAMES)
unset env(CUR_BRANCH)
catch { unset env(ARGS) }
catch { unset env(REVISION) }
diff --git a/po/glossary/txt-to-pot.sh b/po/glossary/txt-to-pot.sh
index 49bf7c5365..8249915d3c 100755
--- a/po/glossary/txt-to-pot.sh
+++ b/po/glossary/txt-to-pot.sh
@@ -11,7 +11,7 @@
if [ $# -eq 0 ]
then
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;
fi
@@ -33,7 +33,7 @@ cat <<!
msgid ""
msgstr ""
"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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"