checkout: drop git_checkout_reference()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 5707de0..b15b56a 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -58,22 +58,6 @@ GIT_EXTERN(int) git_checkout_head(
git_indexer_stats *stats);
/**
- * Updates files in the index and the working tree to match the content of the
- * commit pointed at by the reference.
- *
- *
- * @param ref reference to follow to a commit
- * @param opts specifies checkout options (may be NULL)
- * @param stats structure through which progress information is reported
- * @return 0 on success, GIT_ERROR otherwise (use giterr_last for information
- * about the error)
- */
-GIT_EXTERN(int) git_checkout_reference(
- git_reference *ref,
- git_checkout_opts *opts,
- git_indexer_stats *stats);
-
-/**
* Updates files in the working tree to match the content of the index.
*
* @param repo repository to check out (must be non-bare)
diff --git a/src/checkout.c b/src/checkout.c
index beb8b5a..c39bccb 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -358,23 +358,3 @@ int git_checkout_head(
return error;
}
-int git_checkout_reference(
- git_reference *ref,
- git_checkout_opts *opts,
- git_indexer_stats *stats)
-{
- git_repository *repo= git_reference_owner(ref);
- git_reference *head = NULL;
- int error;
-
- if ((error = git_reference_create_symbolic(
- &head, repo, GIT_HEAD_FILE, git_reference_name(ref), true)) < 0)
- return error;
-
- error = git_checkout_head(git_reference_owner(ref), opts, stats);
-
- git_reference_free(head);
- return error;
-}
-
-