Sha256: 2adfc330046ffa025f827be4d929d7f30ef45e84a10a4cc2be142d43a095d283

Contents?: true

Size: 1.27 KB

Versions: 268

Compression:

Stored size: 1.27 KB

Contents

#!/usr/bin/env bash

source test/setup

use Test::More

clone-foo-and-bar

subrepo-clone-bar-into-foo

(
  cd "$OWNER/bar"
  git checkout -b branch1
  git push --set-upstream origin branch1
) &> /dev/null || die

# Test subrepo file content:
gitrepo=$OWNER/foo/bar/.gitrepo

{
  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)"
}

(
  cd "$OWNER/foo"
  git subrepo pull bar -b branch1 -u
) &> /dev/null || die

{
  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 branch1
  test-gitrepo-field commit "$bar_head_commit"
  test-gitrepo-field parent "$foo_pull_commit"
  test-gitrepo-field cmdver "$(git subrepo --version)"
}

{
  is "$(
    cd $OWNER/foo
    git subrepo pull bar
  )" \
    "Subrepo 'bar' is up to date." \
    'subrepo detects that we dont need to pull'
}

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/pull-new-branch.t
eac_tools-0.86.4 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.86.3 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_git-0.16.0 vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.86.2 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_git-0.15.0 vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.84.2 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.84.1 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.84.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.83.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.82.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.81.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.80.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.79.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.78.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.77.1 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.77.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.76.1 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.76.0 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t
eac_tools-0.75.2 sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t