diff --git a/demo/new_script.gd b/demo/new_script.gd index 1eccaec..072c82f 100644 --- a/demo/new_script.gd +++ b/demo/new_script.gd @@ -1,3 +1,4 @@ +change4 extends Node diff --git a/godot-git-plugin/src/git_api.cpp b/godot-git-plugin/src/git_api.cpp index 6ecbdf7..dc1cc01 100644 --- a/godot-git-plugin/src/git_api.cpp +++ b/godot-git-plugin/src/git_api.cpp @@ -585,7 +585,7 @@ void GitAPI::_pull(String remote, String username, String password) { Godot::print("GitAPI: Pull ended"); } -void GitAPI::_push(String remote, String username, String password) { +void GitAPI::_push(const String remote, const String username, const String password, const bool force) { Godot::print("GitAPI: Performing push to " + remote); git_remote_ptr remote_object; @@ -614,7 +614,7 @@ void GitAPI::_push(String remote, String username, String password) { String branch_name = _get_current_branch_name(true); - CString pushspec(String() + branch_name); + CString pushspec(String() + (force ? "+" : "") + branch_name); const git_strarray refspec = { &pushspec.data, 1 }; git_push_options push_options = GIT_PUSH_OPTIONS_INIT; diff --git a/godot-git-plugin/src/git_api.h b/godot-git-plugin/src/git_api.h index f9dad42..4d20df8 100644 --- a/godot-git-plugin/src/git_api.h +++ b/godot-git-plugin/src/git_api.h @@ -91,7 +91,7 @@ class GitAPI : public EditorVCSInterface { bool _initialize(const String project_root_path); bool _is_vcs_initialized(); void _pull(const String remote, const String username, const String password); - void _push(const String remote, const String username, const String password); + void _push(const String remote, const String username, const String password, const bool force); bool _shut_down(); void _stage_file(const String file_path); void _unstage_file(const String file_path);