mirror of
https://github.com/git/git.git
synced 2026-03-29 11:00:07 +02:00
Merge branch 'master' into next
* master: diff.c: fix a graph output bug tests: Use skip_all=* to skip tests t9118 (git-svn): prevent early failure from taking down later tests t9118: avoid PEG revision identifier in tests
This commit is contained in:
3
diff.c
3
diff.c
@@ -2627,8 +2627,7 @@ static void fill_metainfo(struct strbuf *msg,
|
||||
(!fill_mmfile(&mf, two) && diff_filespec_is_binary(two)))
|
||||
abbrev = 40;
|
||||
}
|
||||
strbuf_addf(msg, "%s%sindex %s..", set,
|
||||
line_prefix,
|
||||
strbuf_addf(msg, "%s%sindex %s..", line_prefix, set,
|
||||
find_unique_abbrev(one->sha1, abbrev));
|
||||
strbuf_addstr(msg, find_unique_abbrev(two->sha1, abbrev));
|
||||
if (one->mode == two->mode)
|
||||
|
||||
@@ -76,12 +76,12 @@ gitweb_run () {
|
||||
. ./test-lib.sh
|
||||
|
||||
if ! test_have_prereq PERL; then
|
||||
say 'skipping gitweb tests, perl not available'
|
||||
skip_all='skipping gitweb tests, perl not available'
|
||||
test_done
|
||||
fi
|
||||
|
||||
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
|
||||
say 'skipping gitweb tests, perl version is too old'
|
||||
skip_all='skipping gitweb tests, perl version is too old'
|
||||
test_done
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export HOME
|
||||
|
||||
if ! type cvs >/dev/null 2>&1
|
||||
then
|
||||
say 'skipping cvsimport tests, cvs not found'
|
||||
skip_all='skipping cvsimport tests, cvs not found'
|
||||
test_done
|
||||
fi
|
||||
|
||||
@@ -21,11 +21,11 @@ case "$cvsps_version" in
|
||||
2.1 | 2.2*)
|
||||
;;
|
||||
'')
|
||||
say 'skipping cvsimport tests, cvsps not found'
|
||||
skip_all='skipping cvsimport tests, cvsps not found'
|
||||
test_done
|
||||
;;
|
||||
*)
|
||||
say 'skipping cvsimport tests, unsupported cvsps version'
|
||||
skip_all='skipping cvsimport tests, unsupported cvsps version'
|
||||
test_done
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -21,7 +21,7 @@ PERL=${PERL:-perl}
|
||||
svn >/dev/null 2>&1
|
||||
if test $? -ne 1
|
||||
then
|
||||
say 'skipping git svn tests, svn not found'
|
||||
skip_all='skipping git svn tests, svn not found'
|
||||
test_done
|
||||
fi
|
||||
|
||||
@@ -40,13 +40,12 @@ x=$?
|
||||
if test $x -ne 0
|
||||
then
|
||||
if test $x -eq 42; then
|
||||
err='Perl SVN libraries must be >= 1.1.0'
|
||||
skip_all='Perl SVN libraries must be >= 1.1.0'
|
||||
elif test $x -eq 41; then
|
||||
err='svnadmin failed to create fsfs repository'
|
||||
skip_all='svnadmin failed to create fsfs repository'
|
||||
else
|
||||
err='Perl SVN libraries not found or unusable, skipping test'
|
||||
skip_all='Perl SVN libraries not found or unusable'
|
||||
fi
|
||||
say "$err"
|
||||
test_done
|
||||
fi
|
||||
|
||||
@@ -159,7 +158,7 @@ EOF
|
||||
require_svnserve () {
|
||||
if test -z "$SVNSERVE_PORT"
|
||||
then
|
||||
say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
|
||||
skip_all='skipping svnserve test. (set $SVNSERVE_PORT to enable)'
|
||||
test_done
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ HTTPD_DOCUMENT_ROOT_PATH=$HTTPD_ROOT_PATH/www
|
||||
|
||||
if ! test -x "$LIB_HTTPD_PATH"
|
||||
then
|
||||
say "skipping test, no web server found at '$LIB_HTTPD_PATH'"
|
||||
skip_all="skipping test, no web server found at '$LIB_HTTPD_PATH'"
|
||||
test_done
|
||||
fi
|
||||
|
||||
@@ -58,12 +58,12 @@ then
|
||||
then
|
||||
if ! test $HTTPD_VERSION -ge 2
|
||||
then
|
||||
say "skipping test, at least Apache version 2 is required"
|
||||
skip_all="skipping test, at least Apache version 2 is required"
|
||||
test_done
|
||||
fi
|
||||
if ! test -d "$DEFAULT_HTTPD_MODULE_PATH"
|
||||
then
|
||||
say "Apache module directory not found. Skipping tests."
|
||||
skip_all="Apache module directory not found. Skipping tests."
|
||||
test_done
|
||||
fi
|
||||
|
||||
@@ -118,7 +118,7 @@ start_httpd() {
|
||||
>&3 2>&4
|
||||
if test $? -ne 0
|
||||
then
|
||||
say "skipping test, web server setup failed"
|
||||
skip_all="skipping test, web server setup failed"
|
||||
trap 'die' EXIT
|
||||
test_done
|
||||
fi
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
. ./test-lib.sh
|
||||
|
||||
if ! test_have_prereq PERL; then
|
||||
say 'skipping --patch tests, perl not available'
|
||||
skip_all='skipping --patch tests, perl not available'
|
||||
test_done
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if sys.hexversion < 0x02040000:
|
||||
then
|
||||
:
|
||||
else
|
||||
say 'skipping git remote-testgit tests: requires Python 2.4 or newer'
|
||||
skip_all='skipping git remote-testgit tests: requires Python 2.4 or newer'
|
||||
test_done
|
||||
fi
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ done
|
||||
|
||||
if ! echo 'echo space > "$1"' > "e space.sh"
|
||||
then
|
||||
say "Skipping; FS does not support spaces in filenames"
|
||||
skip_all="Skipping; FS does not support spaces in filenames"
|
||||
test_done
|
||||
fi
|
||||
|
||||
|
||||
@@ -28,48 +28,52 @@ test_expect_success 'setup svnrepo' '
|
||||
svn_cmd cp -m "trailing .lock" "$svnrepo/pr ject/trunk" \
|
||||
"$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
|
||||
svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
|
||||
"$svnrepo/pr ject/branches/not-a@{0}reflog" &&
|
||||
"$svnrepo/pr ject/branches/not-a%40{0}reflog" &&
|
||||
start_httpd
|
||||
'
|
||||
|
||||
test_expect_success 'test clone with funky branch names' '
|
||||
git svn clone -s "$svnrepo/pr ject" project &&
|
||||
cd project &&
|
||||
(
|
||||
cd project &&
|
||||
git rev-parse "refs/remotes/fun%20plugin" &&
|
||||
git rev-parse "refs/remotes/more%20fun%20plugin!" &&
|
||||
git rev-parse "refs/remotes/$scary_ref" &&
|
||||
git rev-parse "refs/remotes/%2Eleading_dot" &&
|
||||
git rev-parse "refs/remotes/trailing_dot%2E" &&
|
||||
git rev-parse "refs/remotes/trailing_dotlock%2Elock" &&
|
||||
git rev-parse "refs/remotes/not-a%40{0}reflog" &&
|
||||
cd ..
|
||||
git rev-parse "refs/remotes/not-a%40{0}reflog"
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'test dcommit to funky branch' "
|
||||
cd project &&
|
||||
git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
|
||||
echo hello >> foo &&
|
||||
git commit -m 'hello' -- foo &&
|
||||
git svn dcommit &&
|
||||
cd ..
|
||||
(
|
||||
cd project &&
|
||||
git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
|
||||
echo hello >> foo &&
|
||||
git commit -m 'hello' -- foo &&
|
||||
git svn dcommit
|
||||
)
|
||||
"
|
||||
|
||||
test_expect_success 'test dcommit to scary branch' '
|
||||
cd project &&
|
||||
git reset --hard "refs/remotes/$scary_ref" &&
|
||||
echo urls are scary >> foo &&
|
||||
git commit -m "eep" -- foo &&
|
||||
git svn dcommit &&
|
||||
cd ..
|
||||
(
|
||||
cd project &&
|
||||
git reset --hard "refs/remotes/$scary_ref" &&
|
||||
echo urls are scary >> foo &&
|
||||
git commit -m "eep" -- foo &&
|
||||
git svn dcommit
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'test dcommit to trailing_dotlock branch' '
|
||||
cd project &&
|
||||
git reset --hard "refs/remotes/trailing_dotlock%2Elock" &&
|
||||
echo who names branches like this anyway? >> foo &&
|
||||
git commit -m "bar" -- foo &&
|
||||
git svn dcommit &&
|
||||
cd ..
|
||||
(
|
||||
cd project &&
|
||||
git reset --hard "refs/remotes/trailing_dotlock%2Elock" &&
|
||||
echo who names branches like this anyway? >> foo &&
|
||||
git commit -m "bar" -- foo &&
|
||||
git svn dcommit
|
||||
)
|
||||
'
|
||||
|
||||
stop_httpd
|
||||
|
||||
Reference in New Issue
Block a user