Fixed issue #3261: Review/Apply single patch does not work anymore if patch does...
[TortoiseGit.git] / test / UnitTests / resources / patches / SVN-diff.patch
blobc6e46d94f5f2fc707db8bd1dacff49cd519e7ee5
1 Index: new file.txt
2 ===================================================================
3 --- new file.txt (nonexistent)
4 +++ new file.txt (working copy)
5 @@ -0,0 +1,5 @@
6 +this is a new file
7 +bla
8 +kfjsfd
9 +sdf
10 +dsf
12 Property changes on: new file.txt
13 ___________________________________________________________________
14 Added: svn:eol-style
15 ## -0,0 +1 ##
16 +native
17 \ No newline at end of property
18 Index: Utils/StringUtils.cpp
19 ===================================================================
20 --- Utils/StringUtils.cpp (revision 28340)
21 +++ Utils/StringUtils.cpp (working copy)
22 @@ -1,4 +1,4 @@
23 -// TortoiseSVN - a Windows shell extension for easy version control
24 +// TortoiseSVN - a Windows shell extension for easy version control
26 // Copyright (C) 2003-2011, 2013-2017 - TortoiseSVN
27 // Copyright (C) 2016 - TortoiseGit
28 @@ -536,7 +536,7 @@
29 if (CryptStringToBinaryA(text, (DWORD)strlen(text), CRYPT_STRING_HEX, NULL, &dwLen, NULL, NULL) == FALSE)
30 return NULL;
32 - std::unique_ptr<BYTE[]> strIn(new BYTE[dwLen + 1]);
33 + auto strIn = std::make_unique<BYTE[]>(dwLen + 1);
34 if (CryptStringToBinaryA(text, (DWORD)strlen(text), CRYPT_STRING_HEX, strIn.get(), &dwLen, NULL, NULL) == FALSE)
35 return NULL;
37 @@ -549,7 +549,7 @@
38 return NULL;
39 SecureZeroMemory(blobin.pbData, blobin.cbData);
41 - std::unique_ptr<char[]> result(new char[blobout.cbData + 1]);
42 + auto result = std::make_unique<char[]>(blobout.cbData + 1);
43 strncpy_s(result.get(), blobout.cbData+1, (const char*)blobout.pbData, blobout.cbData);
44 SecureZeroMemory(blobout.pbData, blobout.cbData);
45 LocalFree(blobout.pbData);
46 @@ -563,7 +563,7 @@
47 if (CryptStringToBinaryW(text, (DWORD)wcslen(text), CRYPT_STRING_HEX, NULL, &dwLen, NULL, NULL) == FALSE)
48 return NULL;
50 - std::unique_ptr<BYTE[]> strIn(new BYTE[dwLen + 1]);
51 + auto strIn = std::make_unique<BYTE[]>(dwLen + 1);
52 if (CryptStringToBinaryW(text, (DWORD)wcslen(text), CRYPT_STRING_HEX, strIn.get(), &dwLen, NULL, NULL) == FALSE)
53 return NULL;