@@ -132,20 +132,20 @@ static int perform_checkout_ref(git_repository *repo, git_annotated_commit *targ
132132 /** Grab the commit we're interested to move to */
133133 err = git_commit_lookup (& target_commit , repo , git_annotated_commit_id (target ));
134134 if (err != 0 ) {
135- fprintf (stderr , "failed to lookup commit: %s\n" , giterr_last ()-> message );
135+ fprintf (stderr , "failed to lookup commit: %s\n" , git_error_last ()-> message );
136136 goto cleanup ;
137137 }
138138
139139 /**
140140 * Perform the checkout so the workdir corresponds to what target_commit
141141 * contains.
142142 *
143- * Note that it's okay to pass a git_commit here, because it will be
143+ * Note that it's okay to pass a git_commit here, because it will be
144144 * peeled to a tree.
145145 */
146146 err = git_checkout_tree (repo , (const git_object * )target_commit , & checkout_opts );
147147 if (err != 0 ) {
148- fprintf (stderr , "failed to checkout tree: %s\n" , giterr_last ()-> message );
148+ fprintf (stderr , "failed to checkout tree: %s\n" , git_error_last ()-> message );
149149 goto cleanup ;
150150 }
151151
@@ -161,7 +161,7 @@ static int perform_checkout_ref(git_repository *repo, git_annotated_commit *targ
161161 err = git_repository_set_head_detached_from_annotated (repo , target );
162162 }
163163 if (err != 0 ) {
164- fprintf (stderr , "failed to update HEAD reference: %s\n" , giterr_last ()-> message );
164+ fprintf (stderr , "failed to update HEAD reference: %s\n" , git_error_last ()-> message );
165165 goto cleanup ;
166166 }
167167
@@ -219,7 +219,7 @@ int main(int argc, char **argv)
219219 */
220220 err = resolve_refish (& checkout_target , repo , args .argv [args .pos ]);
221221 if (err != 0 ) {
222- fprintf (stderr , "failed to resolve %s: %s\n" , args .argv [args .pos ], giterr_last ()-> message );
222+ fprintf (stderr , "failed to resolve %s: %s\n" , args .argv [args .pos ], git_error_last ()-> message );
223223 goto cleanup ;
224224 }
225225 err = perform_checkout_ref (repo , checkout_target , & opts );
0 commit comments