chiark / gitweb /
Change the file timestamp in 'resolved --reset' (bug #10017)
[stgit] / t / t2102-pull-policy-rebase.sh
... / ...
CommitLineData
1#!/bin/sh
2#
3# Copyright (c) 2007 Yann Dirson
4#
5
6test_description='Excercise pull-policy "rebase".'
7
8. ./test-lib.sh
9
10test_expect_success \
11 'Fork stack off parent branch, and add patches to the stack' \
12 '
13 git branch -m master parent &&
14 stg init &&
15 stg branch --create stack &&
16 git repo-config branch.stack.stgit.pull-policy rebase &&
17 git repo-config --list &&
18 stg new c1 -m c1 &&
19 echo a > file && stg add file && stg refresh
20 '
21
22test_expect_success \
23 'Add non-rewinding commit in parent and pull the stack' \
24 '
25 stg branch parent && stg new u1 -m u1 &&
26 echo b > file2 && stg add file2 && stg refresh &&
27 stg branch stack && stg pull &&
28 test -e file2
29 '
30
31test_expect_success \
32 'Rewind/rewrite commit in parent and pull the stack' \
33 '
34 stg branch parent && echo b >> file2 && stg refresh &&
35 stg branch stack && stg pull &&
36 test `wc -l <file2` = 2
37 '
38
39test_done