@@ -140,14 +140,11 @@ void GitBlocks::Clone(wxCommandEvent &event)
140
140
141
141
void GitBlocks::Destroy (wxCommandEvent &event)
142
142
{
143
- if (wxMessageBox (_ (" Are you sure you want to destroy the repository?" ), _ (" Destroy repository" ), wxYES_NO) == wxYES)
143
+ if (wxMessageBox (_ (" Are you sure you want to destroy the local repository?" ), _ (" Destroy local repository" ), wxYES_NO) == wxYES)
144
144
{
145
- #ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
146
- wxString command = _ (" RD /S .git" );
147
- #else
148
- wxString command = _ (" rm -r .git" );
149
- #endif
150
- Execute (command, _ (" Destroying the repository ..." ));
145
+ Manager::Get ()->GetLogManager ()->Log (_ (" Destroying the local repository ..." ), logSlot);
146
+ Manager::Get ()->GetLogManager ()->Log (_ (" <rmdir> .git" ), logSlot);
147
+ wxRmdir (wxGetCwd () + _ (" /.git" ));
151
148
}
152
149
}
153
150
@@ -189,7 +186,7 @@ void GitBlocks::CommitAll(wxCommandEvent &event)
189
186
190
187
void GitBlocks::Push (wxCommandEvent &event)
191
188
{
192
- #ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
189
+ #ifdef __WXMSW__ // Windows needs some extra code
193
190
wxString command = _ (" cmd.exe /C \" " ) + git + _ (" push origin master\" " );
194
191
#else
195
192
wxString command = _ (" xterm -e \" " ) + git + _ (" push origin HEAD\" " );
@@ -199,7 +196,7 @@ void GitBlocks::Push(wxCommandEvent &event)
199
196
200
197
void GitBlocks::Pull (wxCommandEvent &event)
201
198
{
202
- #ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
199
+ #ifdef __WXMSW__ // Windows needs some extra code
203
200
wxString command = _ (" cmd.exe /C \" " ) + git + _ (" pull origin\" " );
204
201
#else
205
202
wxString command = _ (" xterm -e \" " ) + git + _ (" pull origin\" " );
@@ -209,7 +206,7 @@ void GitBlocks::Pull(wxCommandEvent &event)
209
206
210
207
void GitBlocks::Fetch (wxCommandEvent &event)
211
208
{
212
- #ifdef __WXMSW__ // Fucking hipster Windows needs some extra code
209
+ #ifdef __WXMSW__ // Windows needs some extra code
213
210
wxString command = _ (" cmd.exe /C \" " ) + git + _ (" fetch origin\" " );
214
211
#else
215
212
wxString command = _ (" xterm -e \" " ) + git + _ (" fetch origin\" " );
0 commit comments