mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Merge branch 'js/transport-helper-error-reporting-fix'
Finishing touches to fc/transport-helper-error-reporting topic. * js/transport-helper-error-reporting-fix: git-remote-testgit: build it to run under $SHELL_PATH git-remote-testgit: further remove some bashisms git-remote-testgit: avoid process substitution
This commit is contained in:
commit
1ccb22d524
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -125,6 +125,7 @@
|
|||
/git-remote-ftps
|
||||
/git-remote-fd
|
||||
/git-remote-ext
|
||||
/git-remote-testgit
|
||||
/git-remote-testpy
|
||||
/git-remote-testsvn
|
||||
/git-repack
|
||||
|
|
1
Makefile
1
Makefile
|
@ -460,6 +460,7 @@ SCRIPT_SH += git-mergetool.sh
|
|||
SCRIPT_SH += git-pull.sh
|
||||
SCRIPT_SH += git-quiltimport.sh
|
||||
SCRIPT_SH += git-rebase.sh
|
||||
SCRIPT_SH += git-remote-testgit.sh
|
||||
SCRIPT_SH += git-repack.sh
|
||||
SCRIPT_SH += git-request-pull.sh
|
||||
SCRIPT_SH += git-stash.sh
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2012 Felipe Contreras
|
||||
|
||||
alias=$1
|
||||
|
@ -23,7 +23,6 @@ then
|
|||
testgitmarks="$dir/testgit.marks"
|
||||
test -e "$gitmarks" || >"$gitmarks"
|
||||
test -e "$testgitmarks" || >"$testgitmarks"
|
||||
testgitmarks_args=( "--"{import,export}"-marks=$testgitmarks" )
|
||||
fi
|
||||
|
||||
while read line
|
||||
|
@ -70,7 +69,10 @@ do
|
|||
fi
|
||||
|
||||
echo "feature done"
|
||||
git fast-export "${testgitmarks_args[@]}" $refs |
|
||||
git fast-export \
|
||||
${testgitmarks:+"--import-marks=$testgitmarks"} \
|
||||
${testgitmarks:+"--export-marks=$testgitmarks"} \
|
||||
$refs |
|
||||
sed -e "s#refs/heads/#${prefix}/heads/#g"
|
||||
echo "done"
|
||||
;;
|
||||
|
@ -89,15 +91,19 @@ do
|
|||
|
||||
before=$(git for-each-ref --format=' %(refname) %(objectname) ')
|
||||
|
||||
git fast-import "${testgitmarks_args[@]}" --quiet
|
||||
|
||||
after=$(git for-each-ref --format='%(refname) %(objectname)')
|
||||
git fast-import \
|
||||
${testgitmarks:+"--import-marks=$testgitmarks"} \
|
||||
${testgitmarks:+"--export-marks=$testgitmarks"} \
|
||||
--quiet
|
||||
|
||||
# figure out which refs were updated
|
||||
join -e 0 -o '0 1.2 2.2' -a 2 <(echo "$before") <(echo "$after") |
|
||||
while read ref a b
|
||||
git for-each-ref --format='%(refname) %(objectname)' |
|
||||
while read ref a
|
||||
do
|
||||
test $a == $b && continue
|
||||
case "$before" in
|
||||
*" $ref $a "*)
|
||||
continue ;; # unchanged
|
||||
esac
|
||||
if test -z "$GIT_REMOTE_TESTGIT_PUSH_ERROR"
|
||||
then
|
||||
echo "ok $ref"
|
|
@ -8,11 +8,6 @@ test_description='Test remote-helper import and export commands'
|
|||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-gpg.sh
|
||||
|
||||
if ! type "${BASH-bash}" >/dev/null 2>&1; then
|
||||
skip_all='skipping remote-testgit tests, bash not available'
|
||||
test_done
|
||||
fi
|
||||
|
||||
compare_refs() {
|
||||
git --git-dir="$1/.git" rev-parse --verify $2 >expect &&
|
||||
git --git-dir="$3/.git" rev-parse --verify $4 >actual &&
|
||||
|
|
Loading…
Reference in a new issue