Skip to content

Commit

Permalink
Add test for empty push
Browse files Browse the repository at this point in the history
Add a test to ensure pushing a repo that doesn't have any additional
changes doesn't leave stale metadata behind.
  • Loading branch information
bindreams authored and admorgan committed Apr 21, 2023
1 parent 89f5660 commit 3994d70
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/push-after-push-no-changes.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

set -e

source test/setup

use Test::More

clone-foo-and-bar
subrepo-clone-bar-into-foo

{
message=$(
cd "$OWNER/foo"
git subrepo push bar > /dev/null
add-new-files bar/Bar1
catch git subrepo push bar
)

is "$message" \
"Subrepo 'bar' pushed to '$UPSTREAM/bar' (master)." \
"Output OK: Check that 'push' after an empty push works."
}

done_testing 1

teardown

0 comments on commit 3994d70

Please sign in to comment.