Skip to content

Commit 3994d70

Browse files
bindreamsadmorgan
authored andcommitted
Add test for empty push
Add a test to ensure pushing a repo that doesn't have any additional changes doesn't leave stale metadata behind.
1 parent 89f5660 commit 3994d70

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/push-after-push-no-changes.t

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
source test/setup
6+
7+
use Test::More
8+
9+
clone-foo-and-bar
10+
subrepo-clone-bar-into-foo
11+
12+
{
13+
message=$(
14+
cd "$OWNER/foo"
15+
git subrepo push bar > /dev/null
16+
add-new-files bar/Bar1
17+
catch git subrepo push bar
18+
)
19+
20+
is "$message" \
21+
"Subrepo 'bar' pushed to '$UPSTREAM/bar' (master)." \
22+
"Output OK: Check that 'push' after an empty push works."
23+
}
24+
25+
done_testing 1
26+
27+
teardown

0 commit comments

Comments
 (0)