1
0
mirror of https://github.com/git/git.git synced 2024-10-21 12:48:32 +02:00

Git 1.7.10-rc1

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPYSAWAAoJELC16IaWr+bLmQoQAIumrgZlezaE49Y08TPVjNzI
 BtZ2et503qpHCyIWhn68rgiDWuZL1OKfCXAPcptuqb92Fk0TlRshEGjg8aMPAIdT
 CxtQPde0d+t60l961s9kyNxeSuYFWqNjB9GtO/AvY8kpfZ+FTZTS7UA5OdMBgTdm
 IQBQMvf02tT68EvPZoZ1wqddU8KLiimbxvrzaMYrO1CjYvKUUSLmzxNbIUNhF/B1
 +r6RsFl8gnUfxa3+HEv1WFeKoBTSoPix6e+odF9tTekB+Fza8n9cH7qxXsgtnOAu
 3KsAa+K24tOFR8OEBzUNdRYk4fJs5dmZB/kIEiiU2CVvAqpTy58imdk9d0OmKhSR
 kBQVcATbgz5aUQtlvuoYaV//aiSAA0eGvGgRP47a9he935wkfbmfFQonuUxgGvI4
 zMMa7N6oLko0P9IN/DgLyz/D+LwMyjqpTxLVt2CrEMh68nTAU0prnEy/gxIdwRUJ
 9Jv4BkNBudqj8jbIpkU0+iI598yCCOh9aw7begEYed84wcceMzPlAtC7rwROYhtw
 lf0P/pxWAfj3iOtESFVmSkWMz+MYOWA2fr5wxX8FtWDBFZ2W2mnSy1kNkHNMLo/j
 4QvIsRqxS661WOzDIehNh8F2Mng1bxy08vLR4LaEhIVy+Qb07ziZcUkIFYdhMblf
 d3x9jhNo36QSk8gWhVxE
 =TGu1
 -----END PGP SIGNATURE-----

Merge v1.7.10-rc0 for git l10n update
This commit is contained in:
Jiang Xin 2012-03-16 20:18:07 +08:00
commit d90b16ed42
21 changed files with 265 additions and 105 deletions

@ -25,6 +25,10 @@ Compatibility Notes
"git merge" command if you know everybody who uses your script has
Git v1.7.8 or newer.
* The "--binary/-b" options to "git am" have been a no-op for quite a
while and were deprecated in mid 2008 (v1.6.0). When you give these
options to "git am", it will now warn and ask you not to use them.
Updates since v1.7.9
--------------------
@ -43,20 +47,23 @@ UI, Workflows & Features
* A content filter (clean/smudge) used to be just a way to make the
recorded contents "more useful", and allowed to fail; a filter can
new optionally be marked as "required".
now optionally be marked as "required".
* Options whose names begin with "--no-" (e.g. the "--no-verify"
option of the "git commit" command) can be negated by omitting
"no-" from its name, e.g. "git commit --verify".
* "git am" learned to pass "-b" option to underlying "git mailinfo", so
that bracketed string other than "PATCH" at the beginning can be kept.
that a bracketed string other than "PATCH" at the beginning can be kept.
* "git clone" learned "--single-branch" option to limit cloning to a
single branch (surprise!).
single branch (surprise!); tags that do not point into the history
of the branch are not fetched.
* "git clone" learned to detach the HEAD in the resulting repository
when the source repository's HEAD does not point to a branch.
when the user specifies a tag with "--branch" (e.g., "--branch=v1.0").
Clone also learned to print the usual "detached HEAD" advice in such
a case, similar to "git checkout v1.0".
* When showing a patch while ignoring whitespace changes, the context
lines are taken from the postimage, in order to make it easier to
@ -71,9 +78,12 @@ UI, Workflows & Features
* "fsck" learned "--no-dangling" option to omit dangling object
information.
* "git log -G" learned to pay attention to the "-i" option and can
find patch hunks that introduce or remove a string that matches the
given pattern ignoring the case.
* "git log -G" and "git log -S" learned to pay attention to the "-i"
option. With "-i", "log -G" ignores the case when finding patch
hunks that introduce or remove a string that matches the given
pattern. Similarly with "-i", "log -S" ignores the case when
finding the commit the given block of text appears or disappears
from the file.
* "git merge" in an interactive session learned to spawn the editor
by default to let the user edit the auto-generated merge message,
@ -82,12 +92,15 @@ UI, Workflows & Features
Both "git merge" and "git pull" can be given --no-edit from the
command line to accept the auto-generated merge message.
* The advise message given when the user didn't give enough clue on
* The advice message given when the user didn't give enough clue on
what to merge to "git pull" and "git merge" has been updated to
be more concise and easier to understand.
* "git push" learned the "--prune" option, similar to "git fetch".
* The whole directory that houses a top-level superproject managed by
"git submodule" can be moved to another place.
* "git symbolic-ref" learned the "--short" option to abbreviate the
refname it shows unambiguously.
@ -95,7 +108,7 @@ UI, Workflows & Features
output to those that point at the given object.
* "gitweb" allows intermediate entries in the directory hierarchy
that leads to a projects to be clicked, which in turn shows the
that leads to a project to be clicked, which in turn shows the
list of projects inside that directory.
* "gitweb" learned to read various pieces of information for the
@ -106,6 +119,10 @@ UI, Workflows & Features
* Project search in "gitweb" shows the substring that matched in the
project name and description highlighted.
* A new script "diffall" is added to contrib/; it drives an
external tool to perform a directory diff of two Git revisions
in one go, unlike "difftool" that compares one file at a time.
Foreign Interface
* Improved handling of views, labels and branches in "git-p4" (in contrib).
@ -149,6 +166,10 @@ Internal Implementation (please report possible regressions)
* The code to check if a path points at a file beyond a symbolic link
has been restructured to be thread-safe.
* When pruning directories that has become empty during "git prune"
and "git prune-packed", call closedir() that iterates over a
directory before rmdir() it.
Also contains minor documentation updates and code clean-ups.
@ -159,21 +180,17 @@ Unless otherwise noted, all the fixes since v1.7.9 in the maintenance
releases are contained in this release (see release notes to them for
details).
* "git bundle" did not record boundary commits correctly when there
are many of them.
(merge efe4be1 tr/maint-bundle-boundary later to maint).
* The "remaining" subcommand to "git rerere" was not documented.
(merge 3e7a1df ph/rerere-doc later to maint).
* "git diff-index" and its friends at the plumbing level showed the
"diff --git" header and nothing else for a path whose cached stat
info is dirty without actual difference when asked to produce a
patch. This was a longstanding bug that we could have fixed long
time ago.
(merge b3f01ff jc/maint-diff-patch-header later to maint).
* "git tag -s" honored "gpg.program" configuration variable since
1.7.9, but "git tag -v" and "git verify-tag" didn't.
(merge a2c2506 az/verify-tag-use-gpg-config later to maint).
* The code to synthesize the fake ancestor tree used by 3-way merge
fallback in "git am" was not prepared to read a patch created with
a non-standard -p<num> value.
(merge a61ba26 jc/am-3-nonstandard-popt later to maint).
* When "git config" diagnoses an error in a configuration file and
shows the line number for the offending line, it miscounted if the
error was at the end of line.
(merge 4b34059 ms/maint-config-error-at-eol-linecount later to maint).
* "gitweb" used to drop warnings in the log file when "heads" view is
accessed in a repository whose HEAD does not point at a valid
@ -181,7 +198,7 @@ details).
---
exec >/var/tmp/1
O=v1.7.9.3-366-g1e4d087
O=v1.7.10-rc0-50-gd973dc0
echo O=$(git describe)
git log --first-parent --oneline ^maint $O..
echo

@ -0,0 +1,24 @@
Git v1.7.9.4 Release Notes
==========================
Fixes since v1.7.9.3
--------------------
* The code to synthesize the fake ancestor tree used by 3-way merge
fallback in "git am" was not prepared to read a patch created with
a non-standard -p<num> value.
* "git bundle" did not record boundary commits correctly when there
are many of them.
* "git diff-index" and its friends at the plumbing level showed the
"diff --git" header and nothing else for a path whose cached stat
info is dirty without actual difference when asked to produce a
patch. This was a longstanding bug that we could have fixed long
time ago.
* "gitweb" did use quotemeta() to prepare search string when asked to
do a fixed-string project search, but did not use it by mistake and
used the user-supplied string instead.
Also contains minor fixes and documentation updates.

@ -24,8 +24,8 @@ be highlighted with an asterisk. Option `-r` causes the remote-tracking
branches to be listed, and option `-a` shows both. This list mode is also
activated by the `--list` option (see below).
<pattern> restricts the output to matching branches, the pattern is a shell
wildcard (i.e., matched using fnmatch(3))
Multiple patterns may be given; if any of them matches, the tag is shown.
wildcard (i.e., matched using fnmatch(3)).
Multiple patterns may be given; if any of them matches, the branch is shown.
With `--contains`, shows only the branches that contain the named commit
(in other words, the branches whose tip commits are descendants of the
@ -49,7 +49,7 @@ the remote-tracking branch. This behavior may be changed via the global
overridden by using the `--track` and `--no-track` options, and
changed later using `git branch --set-upstream`.
With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
With a `-m` or `-M` option, <oldbranch> will be renamed to <newbranch>.
If <oldbranch> had a corresponding reflog, it is renamed to match
<newbranch>, and a reflog entry is created to remember the branch
renaming. If <newbranch> exists, -M must be used to force the rename
@ -59,7 +59,7 @@ With a `-d` or `-D` option, `<branchname>` will be deleted. You may
specify more than one branch for deletion. If the branch currently
has a reflog then the reflog will also be deleted.
Use -r together with -d to delete remote-tracking branches. Note, that it
Use `-r` together with `-d` to delete remote-tracking branches. Note, that it
only makes sense to delete remote-tracking branches if they no longer exist
in the remote repository or if 'git fetch' was configured not to fetch
them again. See also the 'prune' subcommand of linkgit:git-remote[1] for a
@ -154,17 +154,18 @@ start-point is either a local or remote-tracking branch.
branch.autosetupmerge configuration variable is true.
--set-upstream::
If specified branch does not exist yet or if '--force' has been
given, acts exactly like '--track'. Otherwise sets up configuration
like '--track' would when creating the branch, except that where
If specified branch does not exist yet or if `--force` has been
given, acts exactly like `--track`. Otherwise sets up configuration
like `--track` would when creating the branch, except that where
branch points to is not changed.
--edit-description::
Open an editor and edit the text to explain what the branch is
for, to be used by various other commands (e.g. `request-pull`).
--contains <commit>::
Only list branches which contain the specified commit.
--contains [<commit>]::
Only list branches which contain the specified commit (HEAD
if not specified).
--merged [<commit>]::
Only list branches whose tips are reachable from the

@ -8,7 +8,7 @@ git-rerere - Reuse recorded resolution of conflicted merges
SYNOPSIS
--------
[verse]
'git rerere' ['clear'|'forget' <pathspec>|'diff'|'status'|'gc']
'git rerere' ['clear'|'forget' <pathspec>|'diff'|'remaining'|'status'|'gc']
DESCRIPTION
-----------
@ -37,30 +37,35 @@ its working state.
'clear'::
This resets the metadata used by rerere if a merge resolution is to be
Reset the metadata used by rerere if a merge resolution is to be
aborted. Calling 'git am [--skip|--abort]' or 'git rebase [--skip|--abort]'
will automatically invoke this command.
'forget' <pathspec>::
This resets the conflict resolutions which rerere has recorded for the current
Reset the conflict resolutions which rerere has recorded for the current
conflict in <pathspec>.
'diff'::
This displays diffs for the current state of the resolution. It is
Display diffs for the current state of the resolution. It is
useful for tracking what has changed while the user is resolving
conflicts. Additional arguments are passed directly to the system
'diff' command installed in PATH.
'status'::
Like 'diff', but this only prints the filenames that will be tracked
for resolutions.
Print paths with conflicts whose merge resolution rerere will record.
'remaining'::
Print paths with conflicts that have not been autoresolved by rerere.
This includes paths whose resolutions cannot be tracked by rerere,
such as conflicting submodules.
'gc'::
This prunes records of conflicted merges that
Prune records of conflicted merges that
occurred a long time ago. By default, unresolved conflicts older
than 15 days and resolved conflicts older than 60
days are pruned. These defaults are controlled via the

@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
* link:v1.7.9.3/git.html[documentation for release 1.7.9.3]
* link:v1.7.9.4/git.html[documentation for release 1.7.9.4]
* release notes for
link:RelNotes/1.7.9.4.txt[1.7.9.4],
link:RelNotes/1.7.9.3.txt[1.7.9.3],
link:RelNotes/1.7.9.2.txt[1.7.9.2],
link:RelNotes/1.7.9.1.txt[1.7.9.1],

@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
DEF_VER=v1.7.10-rc0
DEF_VER=v1.7.10-rc1
LF='
'

@ -35,8 +35,6 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts)
unlink_or_warn(pathname);
display_progress(progress, i + 1);
}
pathname[len] = 0;
rmdir(pathname);
}
void prune_packed_objects(int opts)
@ -65,6 +63,8 @@ void prune_packed_objects(int opts)
continue;
prune_dir(i, d, pathname, len + 3, opts);
closedir(d);
pathname[len + 2] = '\0';
rmdir(pathname);
}
stop_progress(&progress);
}

@ -85,9 +85,9 @@ static int prune_dir(int i, char *path)
}
fprintf(stderr, "bad sha1 file: %s/%s\n", path, de->d_name);
}
closedir(dir);
if (!show_only)
rmdir(path);
closedir(dir);
return 0;
}

@ -58,6 +58,14 @@ static int verify_tag(const char *name, int verbose)
return ret;
}
static int git_verify_tag_config(const char *var, const char *value, void *cb)
{
int status = git_gpg_config(var, value, cb);
if (status)
return status;
return git_default_config(var, value, cb);
}
int cmd_verify_tag(int argc, const char **argv, const char *prefix)
{
int i = 1, verbose = 0, had_error = 0;
@ -66,7 +74,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
OPT_END()
};
git_config(git_default_config, NULL);
git_config(git_verify_tag_config, NULL);
argc = parse_options(argc, argv, prefix, verify_tag_options,
verify_tag_usage, PARSE_OPT_KEEP_ARGV0);

@ -196,8 +196,10 @@ static char *parse_value(void)
for (;;) {
int c = get_next_char();
if (c == '\n') {
if (quote)
if (quote) {
cf->linenr--;
return NULL;
}
return cf->value.buf;
}
if (comment)
@ -287,7 +289,7 @@ static int get_extended_base_var(char *name, int baselen, int c)
{
do {
if (c == '\n')
return -1;
goto error_incomplete_line;
c = get_next_char();
} while (isspace(c));
@ -299,13 +301,13 @@ static int get_extended_base_var(char *name, int baselen, int c)
for (;;) {
int c = get_next_char();
if (c == '\n')
return -1;
goto error_incomplete_line;
if (c == '"')
break;
if (c == '\\') {
c = get_next_char();
if (c == '\n')
return -1;
goto error_incomplete_line;
}
name[baselen++] = c;
if (baselen > MAXNAME / 2)
@ -316,6 +318,9 @@ static int get_extended_base_var(char *name, int baselen, int c)
if (get_next_char() != ']')
return -1;
return baselen;
error_incomplete_line:
cf->linenr--;
return -1;
}
static int get_base_var(char *name)

@ -380,7 +380,9 @@ do
-i|--interactive)
interactive=t ;;
-b|--binary)
: ;;
echo >&2 "The $1 option has been a no-op for long time, and"
echo >&2 "it will be removed. Please do not use it anymore."
;;
-3|--3way)
threeway=t ;;
-s|--signoff)

@ -21,7 +21,7 @@ GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
if test -n "@@USE_GETTEXT_SCHEME@@"
then
GIT_INTERNAL_GETTEXT_SH_SCHEME="@@USE_GETTEXT_SCHEME@@"
elif test -n "@@USE_FALLTHROUGH_GETTEXT_SCHEME@@$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
elif test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
then
: no probing necessary
elif test -n "$GIT_GETTEXT_POISON"

@ -132,46 +132,46 @@ module_clone()
gitdir_base=
name=$(module_name "$path" 2>/dev/null)
test -n "$name" || name="$path"
base_path=$(dirname "$path")
base_name=$(dirname "$name")
gitdir=$(git rev-parse --git-dir)
gitdir_base="$gitdir/modules/$base_path"
gitdir="$gitdir/modules/$path"
case $gitdir in
/*)
a="$(cd_to_toplevel && pwd)/"
b=$gitdir
while [ "$b" ] && [ "${a%%/*}" = "${b%%/*}" ]
do
a=${a#*/} b=${b#*/};
done
rel="$a$name"
rel=`echo $rel | sed -e 's|[^/]*|..|g'`
rel_gitdir="$rel/$b"
;;
*)
rel=`echo $name | sed -e 's|[^/]*|..|g'`
rel_gitdir="$rel/$gitdir"
;;
esac
gitdir_base="$gitdir/modules/$base_name"
gitdir="$gitdir/modules/$name"
if test -d "$gitdir"
then
mkdir -p "$path"
echo "gitdir: $rel_gitdir" >"$path/.git"
rm -f "$gitdir/index"
else
mkdir -p "$gitdir_base"
if test -n "$reference"
then
git-clone $quiet "$reference" -n "$url" "$path" --separate-git-dir "$gitdir"
else
git-clone $quiet -n "$url" "$path" --separate-git-dir "$gitdir"
fi ||
git clone $quiet -n ${reference:+"$reference"} \
--separate-git-dir "$gitdir" "$url" "$path" ||
die "$(eval_gettext "Clone of '\$url' into submodule path '\$path' failed")"
fi
a=$(cd "$gitdir" && pwd)/
b=$(cd "$path" && pwd)/
# normalize Windows-style absolute paths to POSIX-style absolute paths
case $a in [a-zA-Z]:/*) a=/${a%%:*}${a#*:} ;; esac
case $b in [a-zA-Z]:/*) b=/${b%%:*}${b#*:} ;; esac
# Remove all common leading directories after a sanity check
if test "${a#$b}" != "$a" || test "${b#$a}" != "$b"; then
die "$(eval_gettext "Gitdir '\$a' is part of the submodule path '\$b' or vice versa")"
fi
while test "${a%%/*}" = "${b%%/*}"
do
a=${a#*/}
b=${b#*/}
done
# Now chop off the trailing '/'s that were added in the beginning
a=${a%/}
b=${b%/}
rel=$(echo $b | sed -e 's|[^/]*|..|g')
echo "gitdir: $rel/$a" >"$path/.git"
rel=$(echo $a | sed -e 's|[^/]*|..|g')
(clear_local_git_env; cd "$path" && GIT_WORK_TREE=. git config core.worktree "$rel/$b")
}
#

@ -3073,15 +3073,15 @@ sub filter_forks_from_projects_list {
sub search_projects_list {
my ($projlist, %opts) = @_;
my $tagfilter = $opts{'tagfilter'};
my $searchtext = $opts{'searchtext'};
my $search_re = $opts{'search_regexp'};
return @$projlist
unless ($tagfilter || $searchtext);
unless ($tagfilter || $search_re);
# searching projects require filling to be run before it;
fill_project_list_info($projlist,
$tagfilter ? 'ctags' : (),
$searchtext ? ('path', 'descr') : ());
$search_re ? ('path', 'descr') : ());
my @projects;
PROJECT:
foreach my $pr (@$projlist) {
@ -3092,10 +3092,10 @@ sub search_projects_list {
grep { lc($_) eq lc($tagfilter) } keys %{$pr->{'ctags'}};
}
if ($searchtext) {
if ($search_re) {
next unless
$pr->{'path'} =~ /$searchtext/ ||
$pr->{'descr_long'} =~ /$searchtext/;
$pr->{'path'} =~ /$search_re/ ||
$pr->{'descr_long'} =~ /$search_re/;
}
push @projects, $pr;
@ -5484,16 +5484,16 @@ sub git_project_list_body {
my $show_ctags = gitweb_check_feature('ctags');
my $tagfilter = $show_ctags ? $input_params{'ctag'} : undef;
$check_forks = undef
if ($tagfilter || $searchtext);
if ($tagfilter || $search_regexp);
# filtering out forks before filling info allows to do less work
@projects = filter_forks_from_projects_list(\@projects)
if ($check_forks);
# search_projects_list pre-fills required info
@projects = search_projects_list(\@projects,
'searchtext' => $searchtext,
'search_regexp' => $search_regexp,
'tagfilter' => $tagfilter)
if ($tagfilter || $searchtext);
if ($tagfilter || $search_regexp);
# fill the rest
@projects = fill_project_list_info(\@projects);

@ -38,4 +38,18 @@ test_expect_success 'test_export works with weird vars' '
test "$bar" = "weird # variable"
'
test_perf 'important variables available in subshells' '
test -n "$HOME" &&
test -n "$TEST_DIRECTORY" &&
test -n "$TRASH_DIRECTORY" &&
test -n "$GIT_BUILD_DIR"
'
test_perf 'test-lib-functions correctly loaded in subshells' '
: >a &&
test_path_is_file a &&
: >b &&
test_cmp a b
'
test_done

@ -7,7 +7,7 @@ test_description="Tests diff generation performance"
test_perf_default_repo
test_perf 'log -3000 (baseline)' '
git log -1000 >/dev/null
git log -3000 >/dev/null
'
test_perf 'log --raw -3000 (tree-only)' '

@ -45,6 +45,10 @@ TEST_NO_CREATE_REPO=t
. ../test-lib.sh
# Variables from test-lib that are normally internal to the tests; we
# need to export them for test_perf subshells
export TEST_DIRECTORY TRASH_DIRECTORY GIT_BUILD_DIR GIT_TEST_CMP
perf_results_dir=$TEST_OUTPUT_DIRECTORY/test-results
mkdir -p "$perf_results_dir"
rm -f "$perf_results_dir"/$(basename "$0" .sh).subtests
@ -119,7 +123,7 @@ test_run_perf_ () {
test_export_="test_cleanup"
export test_cleanup test_export_
/usr/bin/time -f "%E %U %S" -o test_time.$i "$SHELL" -c '
. '"$TEST_DIRECTORY"/../test-lib-functions.sh'
. '"$TEST_DIRECTORY"/test-lib-functions.sh'
test_export () {
[ $# != 0 ] || return 0
test_export_="$test_export_\\|$1"

@ -7,6 +7,10 @@ test_description="Gettext reencoding of our *.po/*.mo files works"
. ./lib-gettext.sh
# The constants used in a tricky observation for undefined behaviour
RUNES="TILRAUN: ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ"
PUNTS="TILRAUN: ?? ???? ??? ?? ???? ?? ??? ????? ??????????? ??? ?? ????"
MSGKEY="TEST: Old English Runes"
test_expect_success GETTEXT_LOCALE 'gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic' '
printf "TILRAUN: Halló Heimur!" >expect &&
@ -15,8 +19,8 @@ test_expect_success GETTEXT_LOCALE 'gettext: Emitting UTF-8 from our UTF-8 *.mo
'
test_expect_success GETTEXT_LOCALE 'gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes' '
printf "TILRAUN: ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: Old English Runes" >actual &&
printf "%s" "$RUNES" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "$MSGKEY" >actual &&
test_cmp expect actual
'
@ -26,18 +30,23 @@ test_expect_success GETTEXT_ISO_LOCALE 'gettext: Emitting ISO-8859-1 from our UT
test_cmp expect actual
'
test_expect_success GETTEXT_ISO_LOCALE 'gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Runes' '
LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: Old English Runes" >runes &&
if grep "^TEST: Old English Runes$" runes
then
say "Your system can not handle this complexity and returns the string as-is"
else
# Both Solaris and GNU libintl will return this stream of
# question marks, so it is s probably portable enough
printf "TILRAUN: ?? ???? ??? ?? ???? ?? ??? ????? ??????????? ??? ?? ????" >runes-expect &&
test_cmp runes-expect runes
fi
test_expect_success GETTEXT_ISO_LOCALE 'gettext: impossible ISO-8859-1 output' '
LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "$MSGKEY" >runes &&
case "$(cat runes)" in
"$MSGKEY")
say "Your system gives back the key to message catalog"
;;
"$PUNTS")
say "Your system replaces an impossible character with ?"
;;
"$RUNES")
say "Your system gives back the raw message for an impossible request"
;;
*)
say "We never saw the error behaviour your system exhibits"
false
;;
esac
'
test_expect_success GETTEXT_LOCALE 'gettext: Fetching a UTF-8 msgid -> UTF-8' '

@ -985,4 +985,35 @@ test_expect_success 'git config --edit respects core.editor' '
test_cmp expect actual
'
# malformed configuration files
test_expect_success 'barf on syntax error' '
cat >.git/config <<-\EOF &&
# broken section line
[section]
key garbage
EOF
test_must_fail git config --get section.key >actual 2>error &&
grep " line 3 " error
'
test_expect_success 'barf on incomplete section header' '
cat >.git/config <<-\EOF &&
# broken section line
[section
key = value
EOF
test_must_fail git config --get section.key >actual 2>error &&
grep " line 2 " error
'
test_expect_success 'barf on incomplete string' '
cat >.git/config <<-\EOF &&
# broken section line
[section]
key = "value string
EOF
test_must_fail git config --get section.key >actual 2>error &&
grep " line 3 " error
'
test_done

@ -79,6 +79,15 @@ test_expect_success 'submodule add' '
cd addtest &&
git submodule add -q "$submodurl" submod >actual &&
test ! -s actual &&
echo "gitdir: ../.git/modules/submod" >expect &&
test_cmp expect submod/.git &&
(
cd submod &&
git config core.worktree >actual &&
echo "../../../submod" >expect &&
test_cmp expect actual &&
rm -f actual expect
) &&
git submodule init
) &&
@ -498,4 +507,17 @@ test_expect_success 'relative path works with user@host:path' '
)
'
test_expect_success 'moving the superproject does not break submodules' '
(
cd addtest &&
git submodule status >expect
)
mv addtest addtest2 &&
(
cd addtest2 &&
git submodule status >actual &&
test_cmp expect actual
)
'
test_done

@ -619,4 +619,21 @@ test_expect_success 'submodule add properly re-creates deeper level submodules'
)
'
test_expect_success 'submodule update properly revives a moved submodule' '
(cd super &&
git commit -am "pre move" &&
git status >expect&&
H=$(cd submodule2; git rev-parse HEAD) &&
git rm --cached submodule2 &&
rm -rf submodule2 &&
mkdir -p "moved/sub module" &&
git update-index --add --cacheinfo 160000 $H "moved/sub module" &&
git config -f .gitmodules submodule.submodule2.path "moved/sub module"
git commit -am "post move" &&
git submodule update &&
git status >actual &&
test_cmp expect actual
)
'
test_done