mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-06 00:32:30 +00:00
merge tests: move expected data into own file
This commit is contained in:
parent
76ade3a0b8
commit
dcde572042
42
tests/merge/conflict_data.h
Normal file
42
tests/merge/conflict_data.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#define AUTOMERGEABLE_MERGED_FILE \
|
||||||
|
"this file is changed in master\n" \
|
||||||
|
"this file is automergeable\n" \
|
||||||
|
"this file is automergeable\n" \
|
||||||
|
"this file is automergeable\n" \
|
||||||
|
"this file is automergeable\n" \
|
||||||
|
"this file is automergeable\n" \
|
||||||
|
"this file is automergeable\n" \
|
||||||
|
"this file is automergeable\n" \
|
||||||
|
"this file is changed in branch\n"
|
||||||
|
|
||||||
|
#define AUTOMERGEABLE_MERGED_FILE_CRLF \
|
||||||
|
"this file is changed in master\r\n" \
|
||||||
|
"this file is automergeable\r\n" \
|
||||||
|
"this file is automergeable\r\n" \
|
||||||
|
"this file is automergeable\r\n" \
|
||||||
|
"this file is automergeable\r\n" \
|
||||||
|
"this file is automergeable\r\n" \
|
||||||
|
"this file is automergeable\r\n" \
|
||||||
|
"this file is automergeable\r\n" \
|
||||||
|
"this file is changed in branch\r\n"
|
||||||
|
|
||||||
|
#define CONFLICTING_MERGE_FILE \
|
||||||
|
"<<<<<<< HEAD\n" \
|
||||||
|
"this file is changed in master and branch\n" \
|
||||||
|
"=======\n" \
|
||||||
|
"this file is changed in branch and master\n" \
|
||||||
|
">>>>>>> 7cb63eed597130ba4abb87b3e544b85021905520\n"
|
||||||
|
|
||||||
|
#define CONFLICTING_DIFF3_FILE \
|
||||||
|
"<<<<<<< HEAD\n" \
|
||||||
|
"this file is changed in master and branch\n" \
|
||||||
|
"||||||| initial\n" \
|
||||||
|
"this file is a conflict\n" \
|
||||||
|
"=======\n" \
|
||||||
|
"this file is changed in branch and master\n" \
|
||||||
|
">>>>>>> 7cb63eed597130ba4abb87b3e544b85021905520\n"
|
||||||
|
|
||||||
|
#define CONFLICTING_UNION_FILE \
|
||||||
|
"this file is changed in master and branch\n" \
|
||||||
|
"this file is changed in branch and master\n"
|
||||||
|
|
@ -4,6 +4,7 @@
|
|||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "merge.h"
|
#include "merge.h"
|
||||||
#include "merge_helpers.h"
|
#include "merge_helpers.h"
|
||||||
|
#include "conflict_data.h"
|
||||||
#include "refs.h"
|
#include "refs.h"
|
||||||
#include "fileops.h"
|
#include "fileops.h"
|
||||||
#include "diff_xdiff.h"
|
#include "diff_xdiff.h"
|
||||||
|
@ -4,49 +4,6 @@
|
|||||||
#include "merge.h"
|
#include "merge.h"
|
||||||
#include "git2/merge.h"
|
#include "git2/merge.h"
|
||||||
|
|
||||||
#define AUTOMERGEABLE_MERGED_FILE \
|
|
||||||
"this file is changed in master\n" \
|
|
||||||
"this file is automergeable\n" \
|
|
||||||
"this file is automergeable\n" \
|
|
||||||
"this file is automergeable\n" \
|
|
||||||
"this file is automergeable\n" \
|
|
||||||
"this file is automergeable\n" \
|
|
||||||
"this file is automergeable\n" \
|
|
||||||
"this file is automergeable\n" \
|
|
||||||
"this file is changed in branch\n"
|
|
||||||
|
|
||||||
#define AUTOMERGEABLE_MERGED_FILE_CRLF \
|
|
||||||
"this file is changed in master\r\n" \
|
|
||||||
"this file is automergeable\r\n" \
|
|
||||||
"this file is automergeable\r\n" \
|
|
||||||
"this file is automergeable\r\n" \
|
|
||||||
"this file is automergeable\r\n" \
|
|
||||||
"this file is automergeable\r\n" \
|
|
||||||
"this file is automergeable\r\n" \
|
|
||||||
"this file is automergeable\r\n" \
|
|
||||||
"this file is changed in branch\r\n"
|
|
||||||
|
|
||||||
#define CONFLICTING_MERGE_FILE \
|
|
||||||
"<<<<<<< HEAD\n" \
|
|
||||||
"this file is changed in master and branch\n" \
|
|
||||||
"=======\n" \
|
|
||||||
"this file is changed in branch and master\n" \
|
|
||||||
">>>>>>> 7cb63eed597130ba4abb87b3e544b85021905520\n"
|
|
||||||
|
|
||||||
#define CONFLICTING_DIFF3_FILE \
|
|
||||||
"<<<<<<< HEAD\n" \
|
|
||||||
"this file is changed in master and branch\n" \
|
|
||||||
"||||||| initial\n" \
|
|
||||||
"this file is a conflict\n" \
|
|
||||||
"=======\n" \
|
|
||||||
"this file is changed in branch and master\n" \
|
|
||||||
">>>>>>> 7cb63eed597130ba4abb87b3e544b85021905520\n"
|
|
||||||
|
|
||||||
#define CONFLICTING_UNION_FILE \
|
|
||||||
"this file is changed in master and branch\n" \
|
|
||||||
"this file is changed in branch and master\n"
|
|
||||||
|
|
||||||
|
|
||||||
struct merge_index_entry {
|
struct merge_index_entry {
|
||||||
uint16_t mode;
|
uint16_t mode;
|
||||||
char oid_str[GIT_OID_HEXSZ+1];
|
char oid_str[GIT_OID_HEXSZ+1];
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
#include "git2/merge.h"
|
#include "git2/merge.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "merge.h"
|
#include "merge.h"
|
||||||
#include "../merge_helpers.h"
|
|
||||||
#include "fileops.h"
|
#include "fileops.h"
|
||||||
|
#include "../merge_helpers.h"
|
||||||
|
#include "../conflict_data.h"
|
||||||
|
|
||||||
static git_repository *repo;
|
static git_repository *repo;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "git2/merge.h"
|
#include "git2/merge.h"
|
||||||
#include "merge.h"
|
#include "merge.h"
|
||||||
#include "../merge_helpers.h"
|
#include "../merge_helpers.h"
|
||||||
|
#include "../conflict_data.h"
|
||||||
|
|
||||||
static git_repository *repo;
|
static git_repository *repo;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "merge.h"
|
#include "merge.h"
|
||||||
#include "../merge_helpers.h"
|
#include "../merge_helpers.h"
|
||||||
|
#include "../conflict_data.h"
|
||||||
#include "refs.h"
|
#include "refs.h"
|
||||||
#include "fileops.h"
|
#include "fileops.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user