File: t1001-branch-rename.sh

package info (click to toggle)
stgit 0.19-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,748 kB
  • sloc: python: 10,558; sh: 5,739; lisp: 2,678; makefile: 142; perl: 42
file content (33 lines) | stat: -rwxr-xr-x 622 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
# Copyright (c) 2006 Yann Dirson
#

test_description='Branch renames.

Exercises branch renaming commands.
'

. ./test-lib.sh

test_expect_success \
    'Create an stgit branch from scratch' \
    'stg init &&
     stg branch -c foo &&
     stg new p1 -m "p1"
'

test_expect_success \
    'Rename the current stgit branch' \
    'command_error stg branch -r foo bar
'

test_expect_success \
    'Rename an stgit branch' \
    'stg branch -c buz &&
     stg branch -r foo bar &&
     [ -z "$(find .git -type f | grep foo | tee /dev/stderr)" ] &&
     test -z "$(git config -l | grep branch\\.foo)"
'

test_done