Skip to content

Instantly share code, notes, and snippets.

@AndrewSmart
Created November 12, 2015 19:15
Show Gist options
  • Save AndrewSmart/64fe788530075069b705 to your computer and use it in GitHub Desktop.
Save AndrewSmart/64fe788530075069b705 to your computer and use it in GitHub Desktop.
git-subrepo Issue #98
#!/usr/bin/env bash
set -e
source test/setup
use Test::More
clone-foo-and-bar
subrepo-clone-bar-into-foo
(
cd $OWNER/bar
add-new-files Bar2
git push
) &> /dev/null || die
(
cd $OWNER/foo
add-new-files bar/Foo2
git push
git subrepo pull bar
git subrepo push bar #Won't push bar/Foo2, says no changes detected.
) &> /dev/null || die
(
cd $OWNER/bar
git pull #Won't pull Foo2 as it wasn't pushed to $UPSTREAM
)
test-exists \
"$OWNER/foo/bar/Foo2" \ #exists
"$OWNER/bar/Foo2" #does not exist!
done_testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment