aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-07 22:43:46 -0800
committerJunio C Hamano <gitster@pobox.com>2008-03-07 22:43:46 -0800
commit60e3cad92ed93120b9e77116163b267fdda44f91 (patch)
tree240c556d8ce0d95433e4680b6725e5754d098627
parentba51795c5fc32a507df9f91ffeae21893e9e7633 (diff)
parentc8744d6a8b27115503565041566d97c21e722584 (diff)
downloadgit-60e3cad92ed93120b9e77116163b267fdda44f91.tar.gz
git-60e3cad92ed93120b9e77116163b267fdda44f91.tar.xz
Merge branch 'maint'
* maint: unquote_c_style: fix off-by-one. test-lib: fix TERM to dumb for test repeatability config.txt: refer to --upload-pack and --receive-pack instead of --exec git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
-rw-r--r--Documentation/config.txt8
-rw-r--r--git-gui/Makefile5
-rw-r--r--quote.c2
-rw-r--r--t/test-lib.sh24
4 files changed, 27 insertions, 12 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 683a53a0b..c5e094a9c 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -896,15 +896,15 @@ remote.<name>.skipDefaultUpdate::
remote.<name>.receivepack::
The default program to execute on the remote side when pushing. See
- option \--exec of linkgit:git-push[1].
+ option \--receive-pack of linkgit:git-push[1].
remote.<name>.uploadpack::
The default program to execute on the remote side when fetching. See
- option \--exec of linkgit:git-fetch-pack[1].
+ option \--upload-pack of linkgit:git-fetch-pack[1].
remote.<name>.tagopt::
- Setting this value to --no-tags disables automatic tag following when fetching
- from remote <name>
+ Setting this value to \--no-tags disables automatic tag following when
+ fetching from remote <name>
remotes.<group>::
The list of remotes which are fetched by "git remote update
diff --git a/git-gui/Makefile b/git-gui/Makefile
index 01e0a46ba..4e321742a 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -224,6 +224,11 @@ else
ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)
MSGFMT := $(TCL_PATH) po/po2msg.sh
endif
+ ifeq (msgfmt,$(MSGFMT))
+ ifeq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null || echo $?),1)
+ MSGFMT := $(TCL_PATH) po/po2msg.sh
+ endif
+ endif
endif
msgsdir = $(gg_libdir)/msgs
diff --git a/quote.c b/quote.c
index d061626c3..40702f6b7 100644
--- a/quote.c
+++ b/quote.c
@@ -288,7 +288,7 @@ int unquote_c_style(struct strbuf *sb, const char *quoted, const char **endp)
switch (*quoted++) {
case '"':
if (endp)
- *endp = quoted + 1;
+ *endp = quoted;
return 0;
case '\\':
break;
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 87a5ea4a6..6aea0ea0a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -3,12 +3,16 @@
# Copyright (c) 2005 Junio C Hamano
#
+# Keep the original TERM for say_color
+ORIGINAL_TERM=$TERM
+
# For repeatability, reset the environment to known value.
LANG=C
LC_ALL=C
PAGER=cat
TZ=UTC
-export LANG LC_ALL PAGER TZ
+TERM=dumb
+export LANG LC_ALL PAGER TERM TZ
EDITOR=:
VISUAL=:
unset GIT_EDITOR
@@ -58,12 +62,14 @@ esac
# This test checks if command xyzzy does the right thing...
# '
# . ./test-lib.sh
-
-[ "x$TERM" != "xdumb" ] &&
- [ -t 1 ] &&
- tput bold >/dev/null 2>&1 &&
- tput setaf 1 >/dev/null 2>&1 &&
- tput sgr0 >/dev/null 2>&1 &&
+[ "x$ORIGINAL_TERM" != "xdumb" ] && (
+ TERM=$ORIGINAL_TERM &&
+ export TERM &&
+ [ -t 1 ] &&
+ tput bold >/dev/null 2>&1 &&
+ tput setaf 1 >/dev/null 2>&1 &&
+ tput sgr0 >/dev/null 2>&1
+ ) &&
color=t
while test "$#" -ne 0
@@ -91,6 +97,9 @@ done
if test -n "$color"; then
say_color () {
+ (
+ TERM=$ORIGINAL_TERM
+ export TERM
case "$1" in
error) tput bold; tput setaf 1;; # bold red
skip) tput bold; tput setaf 2;; # bold green
@@ -101,6 +110,7 @@ if test -n "$color"; then
shift
echo "* $*"
tput sgr0
+ )
}
else
say_color() {