Sha256: 350551ad9251d250f64cfa5abf382851bd54abd8bdc8c3dff6eb000f475dc225

Contents?: true

Size: 885 Bytes

Versions: 268

Compression:

Stored size: 885 Bytes

Contents

#!/usr/bin/env bash

set -e

source test/setup

use Test::More

# Create directory and init git locally as this will test some corner
# cases when you don't have any previous commits to rely on
# see issue/122
(
  mkdir -p $OWNER/init
  cd $OWNER/init
  git init
  mkdir doc
  add-new-files doc/FooBar
  git subrepo init doc || die
  mkdir ../upstream
  git init --bare ../upstream || die
) &> /dev/null

output="$(
  cd $OWNER/init
  git subrepo push doc --remote=../upstream
)"

is "$output" "Subrepo 'doc' pushed to '../upstream' (master)." \
  'Command output is correct'

# Test init/doc/.gitrepo file contents:
gitrepo=$OWNER/init/doc/.gitrepo
{
  test-gitrepo-field "remote" "../upstream"
  test-gitrepo-field "branch" "master"
}

(
  cd $OWNER
  git clone upstream up
) &>/dev/null

{
  test-exists \
    "$OWNER/up/.git/" \
    "!$OWNER/up/.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-after-init.t
eac_tools-0.86.4 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.86.3 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_git-0.16.0 vendor/git-subrepo/test/push-after-init.t
eac_tools-0.86.2 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_git-0.15.0 vendor/git-subrepo/test/push-after-init.t
eac_tools-0.84.2 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.84.1 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.84.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.83.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.82.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.81.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.80.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.79.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.78.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.77.1 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.77.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.76.1 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.76.0 sub/eac_git/vendor/git-subrepo/test/push-after-init.t
eac_tools-0.75.2 sub/eac_git/vendor/git-subrepo/test/push-after-init.t