Sha256: 666f4574c8ffcbb0d2d141decc966b8c54260a42aca25da8dee798ab9292e522

Contents?: true

Size: 981 Bytes

Versions: 268

Compression:

Stored size: 981 Bytes

Contents

#!/usr/bin/env bash

set -e

source test/setup

use Test::More

clone-foo-and-bar

subrepo-clone-bar-into-foo

(
  cd $OWNER/foo
  branchpoint=$(git rev-parse HEAD)
  add-new-files bar/file1
  # We push here to force subrepo to handle
  # histories where it's not first parent
  git subrepo push bar
  add-new-files bar/file2
  git checkout -b other $branchpoint
  add-new-files bar/file3
  add-new-files bar/file4
  add-new-files bar/file5
  git merge master
) >& /dev/null || die

test-exists "$OWNER/foo/bar/file1" "$OWNER/foo/bar/file2" "$OWNER/foo/bar/file3" "$OWNER/foo/bar/file4" "$OWNER/foo/bar/file5"

# -F is needed for branch to fetch new information
is "$(
  cd $OWNER/foo
  git subrepo -F branch bar
)" \
  "Created branch 'subrepo/bar' and worktree '.git/tmp/subrepo/bar'." \
  "subrepo branch command output is correct"

is $(
  cd $OWNER/foo
  git rev-list subrepo/bar | wc -l
) \
  5 \
  "We have only created commits for one of the paths"

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