Sha256: 1619ff8f989cd24cd073711b8ad528d24bc47c9745c2f437c6aef1d1356d51dc

Contents?: true

Size: 1.09 KB

Versions: 268

Compression:

Stored size: 1.09 KB

Contents

#!/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
  echo ".*" >> .gitignore
  git add .gitignore
  git commit -m "Add gitignore"
  git push
) &> /dev/null || die



# Do the pull and check output:
{
  is "$(
    cd $OWNER/foo
    git subrepo pull bar
  )" \
    "Subrepo 'bar' pulled from '../../../tmp/upstream/bar' (master)." \
    'subrepo pull command output is correct'
}

# Test subrepo file content:
gitrepo=$OWNER/foo/bar/.gitrepo
{
  test-exists \
    "$OWNER/foo/bar/Bar2" \
    "$gitrepo"
}

# Test foo/bar/.gitrepo file contents:
{
  foo_pull_commit="$(cd $OWNER/foo; git rev-parse HEAD^)"
  bar_head_commit="$(cd $OWNER/bar; git rev-parse HEAD)"
  test-gitrepo-comment-block
  test-gitrepo-field "remote" "../../../$UPSTREAM/bar"
  test-gitrepo-field "branch" "master"
  test-gitrepo-field "commit" "$bar_head_commit"
  test-gitrepo-field "parent" "$foo_pull_commit"
  test-gitrepo-field "cmdver" "`git subrepo --version`"
}

done_testing

teardown

Version data entries

268 entries across 268 versions & 4 rubygems

Version Path
eac_tools-0.75.1 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.75.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.74.1 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.74.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.73.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.72.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.70.1 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.70.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.69.1 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.69.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.68.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.67.1 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.67.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.66.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.65.1 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.65.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.64.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.63.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.62.1 sub/eac_git/vendor/git-subrepo/test/gitignore.t
eac_tools-0.62.0 sub/eac_git/vendor/git-subrepo/test/gitignore.t