Sha256: df7768954c987eec4908fc8274022ed38f0bbc37a5415693e9bb2cef0ae1ed2c

Contents?: true

Size: 1.67 KB

Versions: 268

Compression:

Stored size: 1.67 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


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

# Check -m commit messages
{
  foo_new_commit_message="$(cd $OWNER/foo; git log --format=%B -n 1)"
  like "$foo_new_commit_message" \
      "Hello World" \
      "subrepo pull commit message"
}

(
  cd $OWNER/bar
  add-new-files Bar3
  git push
) &> /dev/null || die

# Do the pull and check output, use -e:
{
  is "$(
    cd $OWNER/foo
    GIT_EDITOR='echo cowabunga >' git subrepo pull -e bar
  )" \
    "Subrepo 'bar' pulled from '../../../tmp/upstream/bar' (master)." \
    'subrepo pull command output is correct'
}

# Check -e commit messages
{
  foo_new_commit_message="$(cd $OWNER/foo; git log --format=%B -n 1)"
  like "$foo_new_commit_message" \
      "cowabunga" \
      "subrepo pull edit commit message"
}

(
  cd $OWNER/bar
  add-new-files Bar4
  git push
) &> /dev/null || die

# Do the pull and check output, use -e and -m:
{
  is "$(
    cd $OWNER/foo
    GIT_EDITOR=true git subrepo pull -e -m original bar
  )" \
    "Subrepo 'bar' pulled from '../../../tmp/upstream/bar' (master)." \
    'subrepo pull command output is correct'
}

# Check -e commit messages
{
  foo_new_commit_message="$(cd $OWNER/foo; git log --format=%B -n 1)"
  like "$foo_new_commit_message" \
      "original" \
      "subrepo pull edit and message commit message"
}

done_testing

teardown

Version data entries

268 entries across 268 versions & 4 rubygems

Version Path
eac_tools-0.40.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.39.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.38.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.37.2 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_git-0.13.0 vendor/git-subrepo/test/pull-message.t
eac_tools-0.37.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.37.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.36.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.36.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.35.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.34.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_git-0.12.3 vendor/git-subrepo/test/pull-message.t
eac_tools-0.33.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.32.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.31.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_git-0.12.2 vendor/git-subrepo/test/pull-message.t
avm-tools-0.129.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.16.0 sub/avm-tools/sub/eac_git/vendor/git-subrepo/test/pull-message.t
avm-tools-0.128.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.15.0 sub/avm-tools/sub/eac_git/vendor/git-subrepo/test/pull-message.t