4 trap 'rm -rf "$tmp"' EXIT
7 aur fetch aurutils aurutils-git yuzu
9 # HEAD on top of master@{u}
11 git config
--add aurutils.rebase true
12 echo '# test for issue/1007' >>PKGBUILD
13 git
-c user.name
='test' -c user.email
='test@localhost' commit
-m 'test for issue/1007' PKGBUILD
14 head1
=$
(git rev-parse
--verify HEAD
)
16 # HEAD is 1 commit behind
18 git
reset --hard HEAD^
1
19 head2
=$
(git rev-parse
--verify HEAD
)
21 # HEAD on top of master@{u}^1
23 git
reset --hard HEAD^
1
24 echo '# test for issue/1007' >>PKGBUILD
25 git
-c user.name
='test' -c user.email
='test@localhost' commit
-m 'test for issue/1007' PKGBUILD
26 head3
=$
(git rev-parse
--verify HEAD
)
28 # merge can be solved as fast-forward
30 aur fetch
--sync=auto aurutils aurutils-git
32 [[ $
(git rev-parse
--verify HEAD
) == $head1 ]]
34 [[ $
(git rev-parse
--verify HEAD
) != $head2 ]]
36 # diverging history, --ff-only default
38 aur fetch
--sync=auto yuzu || err
=$?
40 aur fetch
--sync=rebase yuzu
42 [[ $
(git rev-parse
--verify HEAD
) != $head3 ]]