@@ -74,7 +74,7 @@ repository reference::owner() const {
7474}
7575
7676object reference::peel_until (object::object_type type) {
77- object result;
77+ object result ( nullptr , ownership::user) ;
7878 if (git_reference_peel (&result.c_ptr_ , c_ptr_,
7979 static_cast <git_object_t >(type)))
8080 throw git_exception ();
@@ -83,7 +83,7 @@ object reference::peel_until(object::object_type type) {
8383
8484reference reference::rename (const std::string &new_name, bool force,
8585 const std::string &log_message) {
86- reference result;
86+ reference result ( nullptr , ownership::user) ;
8787 if (git_reference_rename (&result.c_ptr_ , c_ptr_, new_name.c_str (), force,
8888 log_message.c_str ()))
8989 throw git_exception ();
@@ -98,7 +98,7 @@ reference reference::resolve() {
9898}
9999
100100reference reference::set_target (const oid &id, const std::string &log_message) {
101- reference result;
101+ reference result ( nullptr , ownership::user) ;
102102 if (git_reference_set_target (&result.c_ptr_ , c_ptr_, id.c_ptr (),
103103 log_message.c_str ()))
104104 throw git_exception ();
@@ -107,7 +107,7 @@ reference reference::set_target(const oid &id, const std::string &log_message) {
107107
108108reference reference::set_symbolic_target (const std::string &target,
109109 const std::string &log_message) {
110- reference result;
110+ reference result ( nullptr , ownership::user) ;
111111 if (git_reference_symbolic_set_target (&result.c_ptr_ , c_ptr_, target.c_str (),
112112 log_message.c_str ()))
113113 throw git_exception ();
0 commit comments