mirror of
https://github.com/git/git.git
synced 2026-03-14 10:53:25 +01:00
Merge branch 'master' into next
* master: Allow non-fast-forward of remote tracking branches in default clone core.logallrefupdates: log remotes/ tracking branches. GIT_SKIP_TESTS: allow users to omit tests that are known to break t3900: test conversion to non UTF-8 as well update hook: redirect _both_ diagnostic lines to stderr upon tag failure xdl_merge(): fix a segmentation fault when refining conflicts
This commit is contained in:
@@ -388,7 +388,7 @@ then
|
||||
|
||||
# Set up the mappings to track the remote branches.
|
||||
git-repo-config remote."$origin".fetch \
|
||||
"refs/heads/*:$remote_top/*" '^$' &&
|
||||
"+refs/heads/*:$remote_top/*" '^$' &&
|
||||
rm -f "refs/remotes/$origin/HEAD"
|
||||
git-symbolic-ref "refs/remotes/$origin/HEAD" \
|
||||
"refs/remotes/$origin/$head_points_at" &&
|
||||
|
||||
3
refs.c
3
refs.c
@@ -925,7 +925,8 @@ static int log_ref_write(struct ref_lock *lock,
|
||||
const char *committer;
|
||||
|
||||
if (log_all_ref_updates &&
|
||||
!strncmp(lock->ref_name, "refs/heads/", 11)) {
|
||||
(!strncmp(lock->ref_name, "refs/heads/", 11) ||
|
||||
!strncmp(lock->ref_name, "refs/remotes/", 13))) {
|
||||
if (safe_create_leading_directories(lock->log_file) < 0)
|
||||
return error("unable to create directory for %s",
|
||||
lock->log_file);
|
||||
|
||||
@@ -101,4 +101,15 @@ do
|
||||
'
|
||||
done
|
||||
|
||||
for J in EUCJP ISO-2022-JP
|
||||
do
|
||||
git-repo-config i18n.logoutputencoding $J
|
||||
for H in EUCJP ISO-2022-JP
|
||||
do
|
||||
test_expect_success "$H should be shown in $J now" '
|
||||
compare_with '$H' ../t3900/'$J'.txt
|
||||
'
|
||||
done
|
||||
done
|
||||
|
||||
test_done
|
||||
|
||||
@@ -112,5 +112,27 @@ EOF
|
||||
test_expect_success "expected conflict markers, with -L" \
|
||||
"diff -u test.txt expect.txt"
|
||||
|
||||
sed "s/ tu / TU /" < new1.txt > new5.txt
|
||||
test_expect_failure "conflict in removed tail" \
|
||||
"git-merge-file -p orig.txt new1.txt new5.txt > out"
|
||||
|
||||
cat > expect << EOF
|
||||
Dominus regit me,
|
||||
et nihil mihi deerit.
|
||||
In loco pascuae ibi me collocavit,
|
||||
super aquam refectionis educavit me;
|
||||
animam meam convertit,
|
||||
deduxit me super semitas jusitiae,
|
||||
propter nomen suum.
|
||||
<<<<<<< orig.txt
|
||||
=======
|
||||
Nam et si ambulavero in medio umbrae mortis,
|
||||
non timebo mala, quoniam TU mecum es:
|
||||
virga tua et baculus tuus ipsa me consolata sunt.
|
||||
>>>>>>> new5.txt
|
||||
EOF
|
||||
|
||||
test_expect_success "expected conflict markers" "diff -u expect out"
|
||||
|
||||
test_done
|
||||
|
||||
|
||||
@@ -125,16 +125,43 @@ test_run_ () {
|
||||
return 0
|
||||
}
|
||||
|
||||
test_skip () {
|
||||
this_test=$(expr "./$0" : '.*/\(t[0-9]*\)-[^/]*$')
|
||||
this_test="$this_test.$(expr "$test_count" + 1)"
|
||||
to_skip=
|
||||
for skp in $GIT_SKIP_TESTS
|
||||
do
|
||||
case "$this_test" in
|
||||
$skp)
|
||||
to_skip=t
|
||||
esac
|
||||
done
|
||||
case "$to_skip" in
|
||||
t)
|
||||
say >&3 "skipping test: $@"
|
||||
test_count=$(expr "$test_count" + 1)
|
||||
say "skip $test_count: $1"
|
||||
: true
|
||||
;;
|
||||
*)
|
||||
false
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
test_expect_failure () {
|
||||
test "$#" = 2 ||
|
||||
error "bug in the test script: not 2 parameters to test-expect-failure"
|
||||
say >&3 "expecting failure: $2"
|
||||
test_run_ "$2"
|
||||
if [ "$?" = 0 -a "$eval_ret" != 0 -a "$eval_ret" -lt 129 ]
|
||||
if ! test_skip "$@"
|
||||
then
|
||||
test_ok_ "$1"
|
||||
else
|
||||
test_failure_ "$@"
|
||||
say >&3 "expecting failure: $2"
|
||||
test_run_ "$2"
|
||||
if [ "$?" = 0 -a "$eval_ret" != 0 -a "$eval_ret" -lt 129 ]
|
||||
then
|
||||
test_ok_ "$1"
|
||||
else
|
||||
test_failure_ "$@"
|
||||
fi
|
||||
fi
|
||||
echo >&3 ""
|
||||
}
|
||||
@@ -142,13 +169,16 @@ test_expect_failure () {
|
||||
test_expect_success () {
|
||||
test "$#" = 2 ||
|
||||
error "bug in the test script: not 2 parameters to test-expect-success"
|
||||
say >&3 "expecting success: $2"
|
||||
test_run_ "$2"
|
||||
if [ "$?" = 0 -a "$eval_ret" = 0 ]
|
||||
if ! test_skip "$@"
|
||||
then
|
||||
test_ok_ "$1"
|
||||
else
|
||||
test_failure_ "$@"
|
||||
say >&3 "expecting success: $2"
|
||||
test_run_ "$2"
|
||||
if [ "$?" = 0 -a "$eval_ret" = 0 ]
|
||||
then
|
||||
test_ok_ "$1"
|
||||
else
|
||||
test_failure_ "$@"
|
||||
fi
|
||||
fi
|
||||
echo >&3 ""
|
||||
}
|
||||
@@ -156,13 +186,16 @@ test_expect_success () {
|
||||
test_expect_code () {
|
||||
test "$#" = 3 ||
|
||||
error "bug in the test script: not 3 parameters to test-expect-code"
|
||||
say >&3 "expecting exit code $1: $3"
|
||||
test_run_ "$3"
|
||||
if [ "$?" = 0 -a "$eval_ret" = "$1" ]
|
||||
if ! test_skip "$@"
|
||||
then
|
||||
test_ok_ "$2"
|
||||
else
|
||||
test_failure_ "$@"
|
||||
say >&3 "expecting exit code $1: $3"
|
||||
test_run_ "$3"
|
||||
if [ "$?" = 0 -a "$eval_ret" = "$1" ]
|
||||
then
|
||||
test_ok_ "$2"
|
||||
else
|
||||
test_failure_ "$@"
|
||||
fi
|
||||
fi
|
||||
echo >&3 ""
|
||||
}
|
||||
@@ -223,3 +256,22 @@ test=trash
|
||||
rm -fr "$test"
|
||||
test_create_repo $test
|
||||
cd "$test"
|
||||
|
||||
this_test=$(expr "./$0" : '.*/\(t[0-9]*\)-[^/]*$')
|
||||
for skp in $GIT_SKIP_TESTS
|
||||
do
|
||||
to_skip=
|
||||
for skp in $GIT_SKIP_TESTS
|
||||
do
|
||||
case "$this_test" in
|
||||
$skp)
|
||||
to_skip=t
|
||||
esac
|
||||
done
|
||||
case "$to_skip" in
|
||||
t)
|
||||
say >&3 "skipping test $this_test altogether"
|
||||
say "skip all tests in $this_test"
|
||||
test_done
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -19,7 +19,7 @@ ref_type=$(git cat-file -t "$3")
|
||||
case "$1","$ref_type" in
|
||||
refs/tags/*,commit)
|
||||
echo "*** Un-annotated tags are not allowed in this repo" >&2
|
||||
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate."
|
||||
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
|
||||
exit 1;;
|
||||
refs/tags/*,tag)
|
||||
echo "### Pushing version '${1##refs/tags/}' to the masses" >&2
|
||||
|
||||
@@ -190,6 +190,10 @@ static int xdl_refine_conflicts(xdfenv_t *xe1, xdfenv_t *xe2, xdmerge_t *m,
|
||||
if (m->mode)
|
||||
continue;
|
||||
|
||||
/* no sense refining a conflict when one side is empty */
|
||||
if (m->chg1 == 0 || m->chg2 == 0)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* This probably does not work outside git, since
|
||||
* we have a very simple mmfile structure.
|
||||
|
||||
Reference in New Issue
Block a user