-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
{ | ||
"version": "0.2.1", | ||
"defaults": {}, | ||
"configurations": [ | ||
{ | ||
"type": "default", | ||
"project": "CMakeLists.txt", | ||
"projectTarget": "winprefs.exe (native\\Debug\\winprefs.exe)", | ||
"name": "winprefs.exe (native\\Debug\\winprefs.exe)", | ||
"args": [ | ||
"-K", | ||
"st", | ||
"-c", | ||
"-d" | ||
] | ||
"args": ["-K", "st", "-c", "-d"], | ||
"name": "winprefs.exe (native\\Debug\\winprefs.exe)", | ||
"project": "CMakeLists.txt", | ||
"projectTarget": "winprefs.exe (native\\Debug\\winprefs.exe)", | ||
"type": "default" | ||
} | ||
] | ||
} | ||
], | ||
"defaults": {}, | ||
"version": "0.2.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,10 +48,7 @@ wchar_t *get_git_branch(const wchar_t *git_dir_arg, | |
return NULL; | ||
} | ||
wmemset(cmd, L'\0', cmd_len); | ||
_snwprintf(cmd, | ||
cmd_len, | ||
L"git.exe %ls %ls branch --show-current", git_dir_arg, | ||
work_tree_arg); | ||
_snwprintf(cmd, cmd_len, L"git.exe %ls %ls branch --show-current", git_dir_arg, work_tree_arg); | ||
cmd[cmd_len - 1] = L'\0'; | ||
BOOL ret = CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi); | ||
if (!ret) { | ||
|
@@ -280,19 +277,19 @@ int save_preferences(bool commit, | |
abort(); | ||
} | ||
if (_wspawnlp(P_WAIT, | ||
L"git.exe", | ||
L"git", | ||
git_dir_arg, | ||
work_tree_arg, | ||
L"commit", | ||
L"--no-gpg-sign", | ||
L"--quiet", | ||
L"--no-verify", | ||
L"\"--author=winprefs <[email protected]>\"", | ||
L"-m", | ||
L"git.exe", | ||
L"git", | ||
git_dir_arg, | ||
work_tree_arg, | ||
L"commit", | ||
L"--no-gpg-sign", | ||
L"--quiet", | ||
L"--no-verify", | ||
L"\"--author=winprefs <[email protected]>\"", | ||
L"-m", | ||
L"\"Automatic commit @ \"", | ||
nullptr) != 0) { | ||
abort(); | ||
abort(); | ||
} | ||
if (deploy_key) { | ||
size_t ssh_command_len = 68 + wcslen(full_deploy_key_path) + 3; | ||
|
@@ -301,18 +298,18 @@ int save_preferences(bool commit, | |
abort(); | ||
} | ||
wmemset(ssh_command, L'\0', ssh_command_len); | ||
_snwprintf(ssh_command, | ||
ssh_command_len, | ||
L"\"ssh -i %ls -F nul -o UserKnownHostsFile=nul -o StrictHostKeyChecking=no\"", | ||
full_deploy_key_path); | ||
if ( | ||
_wspawnlp(P_WAIT, | ||
L"git.exe", | ||
L"git", | ||
git_dir_arg, | ||
work_tree_arg, | ||
L"config", | ||
L"core.sshCommand", | ||
_snwprintf( | ||
ssh_command, | ||
ssh_command_len, | ||
L"\"ssh -i %ls -F nul -o UserKnownHostsFile=nul -o StrictHostKeyChecking=no\"", | ||
full_deploy_key_path); | ||
if (_wspawnlp(P_WAIT, | ||
L"git.exe", | ||
L"git", | ||
git_dir_arg, | ||
work_tree_arg, | ||
L"config", | ||
L"core.sshCommand", | ||
ssh_command, | ||
nullptr) != 0) { | ||
abort(); | ||
|
@@ -327,16 +324,16 @@ int save_preferences(bool commit, | |
branch_arg); | ||
} | ||
if (_wspawnlp(P_WAIT, | ||
L"git.exe", | ||
L"git", | ||
git_dir_arg, | ||
work_tree_arg, | ||
L"push", | ||
L"-u", | ||
L"--porcelain", | ||
L"--no-signed", | ||
L"origin", | ||
L"origin", | ||
L"git.exe", | ||
L"git", | ||
git_dir_arg, | ||
work_tree_arg, | ||
L"push", | ||
L"-u", | ||
L"--porcelain", | ||
L"--no-signed", | ||
L"origin", | ||
L"origin", | ||
branch_arg, | ||
nullptr) != 0) { | ||
abort(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#ifndef MEH_H | ||
#define MEH_H | ||
|
||
#ifdef _MSC_VER | ||
#define nullptr NULL | ||
#define bool BOOL | ||
|
||
#define true TRUE | ||
#define false FALSE | ||
#endif | ||
|
||
#endif // MEH_H | ||
#ifndef MEH_H | ||
#define MEH_H | ||
|
||
#ifdef _MSC_VER | ||
#define nullptr NULL | ||
#define bool BOOL | ||
|
||
#define true TRUE | ||
#define false FALSE | ||
#endif | ||
|
||
#endif // MEH_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters