Sha256: 58e1ba5db1c6b4ede8aa78684c60b7381c01501a1662aa50d9d894ebf78fce00

Contents?: true

Size: 993 Bytes

Versions: 268

Compression:

Stored size: 993 Bytes

Contents

#!/usr/bin/env bash

set -e

source test/setup

use Test::More

clone-foo-and-bar

# Make various changes to the repos for testing subrepo push:
(
  # In the main repo:
  cd $OWNER/foo

  # Clone the subrepo into a subdir
  git subrepo clone ../../../$UPSTREAM/bar

  # Make a series of commits:
  add-new-files bar/FooBar1
  add-new-files bar/FooBar2
  modify-files bar/FooBar1
  add-new-files ./FooBar
  modify-files ./FooBar bar/FooBar2
) &> /dev/null || die

# Do the subrepo push and test the output:
{
  message="$(
    cd $OWNER/foo
    git subrepo push bar --squash
  )"

  # Test the output:
  is "$message" \
    "Subrepo 'bar' pushed to '../../../tmp/upstream/bar' (master)." \
    'push message is correct'
}

(
  cd $OWNER/bar
  git pull
) &> /dev/null || die

# Check that all commits arrived in subrepo
test-commit-count "$OWNER/bar" HEAD 3

test-exists \
  "$OWNER/bar/Bar" \
  "$OWNER/bar/FooBar1" \
  "$OWNER/bar/FooBar2" \
  "!$OWNER/bar/.gitrepo" \

done_testing

teardown

Version data entries

268 entries across 268 versions & 4 rubygems

Version Path
eac_tools-0.86.5 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.86.4 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.86.3 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_git-0.16.0 vendor/git-subrepo/test/push-squash.t
eac_tools-0.86.2 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_git-0.15.0 vendor/git-subrepo/test/push-squash.t
eac_tools-0.84.2 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.84.1 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.84.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.83.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.82.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.81.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.80.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.79.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.78.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.77.1 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.77.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.76.1 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.76.0 sub/eac_git/vendor/git-subrepo/test/push-squash.t
eac_tools-0.75.2 sub/eac_git/vendor/git-subrepo/test/push-squash.t