#!/bin/bash set -e . tests/lib t-drs t-tstunt-parsechangelog t-prep-newpackage example 1.0 cd $p git tag common-ancestor revision=1 t-dgit build t-dgit push --new push_and_check () { git push $tmp/git/$p.git $1 oldmaster=`cd $tmp/git/$p.git && t-git-get-ref refs/heads/master` t-refs-same-start git checkout dgit/sid t-commit 'Empty update' t-dgit build t-dgit push --new t-pushed-good dgit/sid } t-check-master-undisturbed () { local master=`t-git-get-ref refs/heads/master` if [ x$master != x$oldmaster ]; then fail "bad update to master"; fi } t_check_pushed_master=t-check-master-undisturbed git checkout -b divergent common-ancestor git commit --allow-empty -m 'Has common ancestor' git push $tmp/git/$p.git HEAD:master push_and_check HEAD:master git checkout --orphan newroot git commit --allow-empty -m 'Has no common ancestor' push_and_check +HEAD:master echo done.