Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80e77b8

Browse files
committed
tests: add rename-rewrite scenarios to "renames" repository
Add two more scenarios to the "renames" repository. The first scenario has a major rewrite of a file and a delete of another file, the second scenario has a deletion of a file and rename of another file to the deleted file. Both scenarios will be used in the following commit.
1 parent d91da1d commit 80e77b8

8 files changed

+15
-0
lines changed

tests/diff/rename.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ void test_diff_rename__cleanup(void)
2020
#define COPY_RENAME_COMMIT "2bc7f351d20b53f1c72c16c4b036e491c478c49a"
2121
#define REWRITE_COPY_COMMIT "1c068dee5790ef1580cfc4cd670915b48d790084"
2222
#define RENAME_MODIFICATION_COMMIT "19dd32dfb1520a64e5bbaae8dce6ef423dfa2f13"
23+
#define REWRITE_DELETE_COMMIT "84d8efa38af7ace2b302de0adbda16b1f1cd2e1b"
24+
#define DELETE_RENAME_COMMIT "be053a189b0bbde545e0a3f59ce00b46ad29ce0d"
2325

2426
/*
2527
* Renames repo has:
@@ -41,6 +43,16 @@ void test_diff_rename__cleanup(void)
4143
* ikeepsix.txt -> ikeepsix.txt (reorder sections in file)
4244
* sixserving.txt -> sixserving.txt (whitespace change - not just indent)
4345
* sevencities.txt -> songof7cities.txt (rename, small text changes)
46+
* commit 84d8efa38af7ace2b302de0adbda16b1f1cd2e1b
47+
* songof7cities.txt -> songof7citie.txt (major rewrite, <20% match)
48+
* ikeepsix.txt -> (deleted)
49+
* untimely.txt (no change)
50+
* sixserving.txt (no change)
51+
* commit be053a189b0bbde545e0a3f59ce00b46ad29ce0d
52+
* ikeepsix.txt -> (deleted)
53+
* songof7cities.txt -> ikeepsix.txt (rename, 100% match)
54+
* untimely.txt (no change)
55+
* sixserving.txt (no change)
4456
*/
4557

4658
void test_diff_rename__match_oid(void)
Binary file not shown.

tests/resources/renames/.gitted/objects/84/d8efa38af7ace2b302de0adbda16b1f1cd2e1b

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
x��Qj�0�S��X+۲ �!4'Xi��H�eC�ߐt�g�r_�f��ZRT�%�*�!q.�&���4��0���.��O���f?� �)g,Z0�����>8y����$�[���ж�t5:�����l���'�<�B� W�������H6%��uJI�
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
be053a189b0bbde545e0a3f59ce00b46ad29ce0d
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
84d8efa38af7ace2b302de0adbda16b1f1cd2e1b

0 commit comments

Comments
 (0)