diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-11 16:51:54 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-11 17:05:56 +0100 |
commit | 9fe91f98a08e948bf3e282cd17f7c2637669a216 (patch) | |
tree | 6cbfb60c858ef71318d39a3933c7d5f029f7ed51 /tests/lib | |
parent | 79c61ce4926d8bb167fcdc5dd494c667ed4e9fbd (diff) |
git-debrebase: merge: test: Introduce t-merge-conflicted-*
NFC
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1025,6 +1025,18 @@ t-make-badcommit () { t-expect-fsck-fail $badcommit } +t-merge-conflicted-stripping-conflict-markers () { + local otherbranch=$1 + local file=$2 + + t-expect-fail F:"Merge conflict in $file" \ + git merge $otherbranch + + perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file" + git add "$file" + git commit --no-edit +} + t-commit () { local msg=$1 v=${2:-${majorv:-1}.$revision} |