summaryrefslogtreecommitdiff
path: root/tests/patch/patch_common.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-11-28 14:41:58 +0100
committerGitHub <noreply@github.com>2019-11-28 14:41:58 +0100
commitfb439c975a2de33f5b0c317f3fdea49dc94b27dc (patch)
treeae22d26f1bc5d91f947577c291309cb57c2ebd77 /tests/patch/patch_common.h
parent61176a9b363b1274c101d82f36cbf9cb71a10f74 (diff)
parentece5bb5e7d6e35e50096bac3d7bf17342daaec77 (diff)
downloadlibgit2-fb439c975a2de33f5b0c317f3fdea49dc94b27dc.tar.gz
Merge pull request #5306 from herrerog/patchid
diff: complete support for git patchid
Diffstat (limited to 'tests/patch/patch_common.h')
-rw-r--r--tests/patch/patch_common.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/patch/patch_common.h b/tests/patch/patch_common.h
index 92ab7692e..660168551 100644
--- a/tests/patch/patch_common.h
+++ b/tests/patch/patch_common.h
@@ -385,6 +385,38 @@
"@@ -9,0 +10 @@ below it!\n" \
"+insert at end\n"
+#define PATCH_DELETED_FILE_2_HUNKS \
+ "diff --git a/a b/a\n" \
+ "index 7f129fd..af431f2 100644\n" \
+ "--- a/a\n" \
+ "+++ b/a\n" \
+ "@@ -1 +1 @@\n" \
+ "-a contents 2\n" \
+ "+a contents\n" \
+ "diff --git a/c/d b/c/d\n" \
+ "deleted file mode 100644\n" \
+ "index 297efb8..0000000\n" \
+ "--- a/c/d\n" \
+ "+++ /dev/null\n" \
+ "@@ -1 +0,0 @@\n" \
+ "-c/d contents\n"
+
+#define PATCH_DELETED_FILE_2_HUNKS_SHUFFLED \
+ "diff --git a/c/d b/c/d\n" \
+ "deleted file mode 100644\n" \
+ "index 297efb8..0000000\n" \
+ "--- a/c/d\n" \
+ "+++ /dev/null\n" \
+ "@@ -1 +0,0 @@\n" \
+ "-c/d contents\n" \
+ "diff --git a/a b/a\n" \
+ "index 7f129fd..af431f2 100644\n" \
+ "--- a/a\n" \
+ "+++ b/a\n" \
+ "@@ -1 +1 @@\n" \
+ "-a contents 2\n" \
+ "+a contents\n"
+
#define PATCH_SIMPLE_COMMIT \
"commit 15e119375018fba121cf58e02a9f17fe22df0df8\n" \
"Author: Edward Thomson <ethomson@edwardthomson.com>\n" \
@@ -878,6 +910,12 @@
"index 27184d9..7c94f9e 100644\n" \
"Binary files a/binary.bin and b/binary.bin differ\n"
+#define PATCH_ADD_BINARY_NOT_PRINTED \
+ "diff --git a/test.bin b/test.bin\n" \
+ "new file mode 100644\n" \
+ "index 0000000..9e0f96a\n" \
+ "Binary files /dev/null and b/test.bin differ\n"
+
#define PATCH_ORIGINAL_NEW_FILE_WITH_SPACE \
"diff --git a/sp ace.txt b/sp ace.txt\n" \
"new file mode 100644\n" \