diff --git a/blogpusher.cpp b/blogpusher.cpp index 4c88a2b..207f6fb 100644 --- a/blogpusher.cpp +++ b/blogpusher.cpp @@ -3,10 +3,13 @@ using namespace std; int main(int argc, char** argv){ string commit; - for(int i = 1; i < argc; i++){ - commit += argv[i]; - if(i != argc - 1){ - commit += " "; + if(argc == 1) commit = "Update"; + else { + for(int i = 1; i < argc; i++) { + commit += argv[i]; + if(i != argc - 1){ + commit += " "; + } } } string commitInput = "git commit -m\"" + commit + "\""; @@ -20,4 +23,4 @@ int main(int argc, char** argv){ cout<<"==========BEGIN PUSH=========="<