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.75.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.75.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.74.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.74.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.73.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.72.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.70.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.70.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.69.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.69.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.68.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.67.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.67.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.66.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.65.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.65.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.64.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.63.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.62.1 sub/eac_git/vendor/git-subrepo/test/pull-message.t
eac_tools-0.62.0 sub/eac_git/vendor/git-subrepo/test/pull-message.t