3 # Copyright (c) 2007 Yann Dirson
6 test_description
='Excercise pull-policy "rebase".'
11 'Fork stack off parent branch, and add patches to the stack' \
13 git branch -m master parent &&
15 stg branch --create stack &&
16 git config branch.stack.stgit.pull-policy rebase &&
19 echo a > file && stg add file && stg refresh
23 'Test invalid remote argument' \
25 command_error stg pull origin 2>&1 | \
26 grep "specifying a repository is meaningless for policy=\"rebase\""
30 'Test invalid arguments' \
32 command_error stg pull origin master 2>&1 | \
33 grep "incorrect number of arguments"
37 'Add non-rewinding commit in parent and pull the stack' \
39 stg branch parent && stg new u1 -m u1 &&
40 echo b > file2 && stg add file2 && stg refresh &&
41 stg branch stack && stg pull &&
42 test_path_is_file file2
46 'Rewind/rewrite commit in parent and pull the stack' \
48 stg branch parent && echo b >> file2 && stg refresh &&
49 stg branch stack && stg pull &&
50 test_line_count = 2 file2