Skip to content

Instantly share code, notes, and snippets.

@oyvholm
Created July 3, 2014 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oyvholm/0f6ff7ffee26224dbe12 to your computer and use it in GitHub Desktop.
Save oyvholm/0f6ff7ffee26224dbe12 to your computer and use it in GitHub Desktop.
t5150-request-pull.sh fails under Debian 7.5 when compiling git v2.0.1-472-g6f92e5f
*** t5150-request-pull.sh ***
not ok 1 - setup
#
#
# git init --bare upstream.git &&
# git init --bare downstream.git &&
# git clone upstream.git upstream-private &&
# git clone downstream.git local &&
#
# trash_url="file://$TRASH_DIRECTORY" &&
# downstream_url="$trash_url/downstream.git/" &&
# upstream_url="$trash_url/upstream.git/" &&
#
# (
# cd upstream-private &&
# cat <<-\EOT >mnemonic.txt &&
# Thirtey days hath November,
# Aprile, June, and September:
# EOT
# git add mnemonic.txt &&
# test_tick &&
# git commit -m "\"Thirty days\", a reminder of month lengths" &&
# git tag -m "version 1" -a initial &&
# git push --tags origin master
# ) &&
# (
# cd local &&
# git remote add upstream "$trash_url/upstream.git" &&
# git fetch upstream &&
# git pull upstream master &&
# cat <<-\EOT >>mnemonic.txt &&
# Of twyecescore-eightt is but eine,
# And all the remnante be thrycescore-eine.
# O’course Leap yare comes an’pynes,
# Ev’rie foure yares, gote it ryghth.
# An’twyecescore-eight is but twyecescore-nyne.
# EOT
# git add mnemonic.txt &&
# test_tick &&
# git commit -m "More detail" &&
# git tag -m "version 2" -a full &&
# git checkout -b simplify HEAD^ &&
# mv mnemonic.txt mnemonic.standard &&
# cat <<-\EOT >mnemonic.clarified &&
# Thirty days has September,
# All the rest I can’t remember.
# EOT
# git add -N mnemonic.standard mnemonic.clarified &&
# git commit -a -m "Adapt to use modern, simpler English
#
# But keep the old version, too, in case some people prefer it." &&
# git checkout master
# )
#
#
ok 2 - setup: two scripts for reading pull requests
not ok 3 - pull request when forgot to push
#
#
# rm -fr downstream.git &&
# git init --bare downstream.git &&
# (
# cd local &&
# git checkout initial &&
# git merge --ff-only master &&
# test_must_fail git request-pull initial "$downstream_url" \
# 2>../err
# ) &&
# grep "No match for commit .*" err &&
# grep "Are you sure you pushed" err
#
#
not ok 4 - pull request after push
#
#
# rm -fr downstream.git &&
# git init --bare downstream.git &&
# (
# cd local &&
# git checkout initial &&
# git merge --ff-only master &&
# git push origin master:for-upstream &&
# git request-pull initial origin master:for-upstream >../request
# ) &&
# sed -nf read-request.sed <request >digest &&
# cat digest &&
# {
# read task &&
# read repository &&
# read branch
# } <digest &&
# (
# cd upstream-private &&
# git checkout initial &&
# git pull --ff-only "$repository" "$branch"
# ) &&
# test "$branch" = for-upstream &&
# test_cmp local/mnemonic.txt upstream-private/mnemonic.txt
#
#
not ok 5 - request asks HEAD to be pulled
#
#
# rm -fr downstream.git &&
# git init --bare downstream.git &&
# (
# cd local &&
# git checkout initial &&
# git merge --ff-only master &&
# git push --tags origin master simplify &&
# git push origin master:for-upstream &&
# git request-pull initial "$downstream_url" >../request
# ) &&
# sed -nf read-request.sed <request >digest &&
# cat digest &&
# {
# read task &&
# read repository &&
# read branch
# } <digest &&
# test -z "$branch"
#
#
not ok 6 - pull request format
#
#
# rm -fr downstream.git &&
# git init --bare downstream.git &&
# cat <<-\EOT >expect &&
# The following changes since commit OBJECT_NAME:
#
# SUBJECT (DATE)
#
# are available in the git repository at:
#
# URL BRANCH
#
# for you to fetch changes up to OBJECT_NAME:
#
# SUBJECT (DATE)
#
# ----------------------------------------------------------------
# VERSION
#
# ----------------------------------------------------------------
# SHORTLOG
#
# DIFFSTAT
# EOT
# (
# cd local &&
# git checkout initial &&
# git merge --ff-only master &&
# git push origin tags/full &&
# git request-pull initial "$downstream_url" tags/full >../request
# ) &&
# <request sed -nf fuzz.sed >request.fuzzy &&
# test_i18ncmp expect request.fuzzy &&
#
# (
# cd local &&
# git request-pull initial "$downstream_url" tags/full:refs/tags/full
# ) >request &&
# sed -nf fuzz.sed <request >request.fuzzy &&
# test_i18ncmp expect request.fuzzy &&
#
# (
# cd local &&
# git request-pull initial "$downstream_url" full
# ) >request &&
# grep " tags/full\$" request
#
not ok 7 - request-pull ignores OPTIONS_KEEPDASHDASH poison
#
#
# (
# cd local &&
# OPTIONS_KEEPDASHDASH=Yes &&
# export OPTIONS_KEEPDASHDASH &&
# git checkout initial &&
# git merge --ff-only master &&
# git push origin master:for-upstream &&
# git request-pull -- initial "$downstream_url" master:for-upstream >../request
# )
#
#
# failed 6 among 7 test(s)
1..7
make[2]: *** [t5150-request-pull.sh] Error 1
make[2]: Leaving directory `/home/sunny/src/other/git/build-git/t'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/home/sunny/src/other/git/build-git/t'
make: *** [test] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment