1#!/bin/sh
   2#
   3# Copyright (c) 2008 Dmitry V. Levin
   4#
   5test_description='fetch exit status test'
   7. ./test-lib.sh
   9test_expect_success setup '
  11        >file &&
  13        git add file &&
  14        git commit -m initial &&
  15        git checkout -b side &&
  17        echo side >file &&
  18        git commit -a -m side &&
  19        git checkout master &&
  21        echo next >file &&
  22        git commit -a -m next
  23'
  24test_expect_success 'non-fast-forward fetch' '
  26        test_must_fail git fetch . master:side
  28'
  30test_expect_success 'forced update' '
  32        git fetch . +master:side
  34'
  36test_done