t / t3200-branch.shon commit Retire rev-tree. (9dcc829)
   1#!/bin/sh
   2#
   3# Copyright (c) 2005 Amos Waterland
   4#
   5
   6test_description='git branch --foo should not create bogus branch
   7
   8This test runs git branch --help and checks that the argument is properly
   9handled.  Specifically, that a bogus branch is not created.
  10'
  11. ./test-lib.sh
  12
  13test_expect_success \
  14    'prepare an trivial repository' \
  15    'echo Hello > A &&
  16     git-update-index --add A &&
  17     git-commit -m "Initial commit."'
  18
  19test_expect_failure \
  20    'git branch --help should return error code' \
  21    'git-branch --help'
  22
  23test_expect_failure \
  24    'git branch --help should not have created a bogus branch' \
  25    'test -f .git/refs/heads/--help'
  26
  27test_done