Sha256: 265ea244b3914f2d313afe4ac665a084c516cef3a2c05a167840da0a70a7e0d4

Contents?: true

Size: 818 Bytes

Versions: 268

Compression:

Stored size: 818 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
  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"

is "$(
  cd $OWNER/foo
  git subrepo 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
) \
  6 \
  "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-one-path.t
eac_tools-0.86.4 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.86.3 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_git-0.16.0 vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.86.2 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_git-0.15.0 vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.84.2 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.84.1 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.84.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.83.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.82.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.81.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.80.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.79.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.78.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.77.1 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.77.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.76.1 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.76.0 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t
eac_tools-0.75.2 sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t