diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-03-06 23:51:40 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-03-16 16:57:30 +0100 |
| commit | 62d38a1ddb8081f8b46e7ff6e21ebeb0014162d6 (patch) | |
| tree | 9db11e71533062a0ec6b55e1e767235469390ec0 /include/git2/repository.h | |
| parent | d675982a15388d8c413acda139b4662062cf3286 (diff) | |
| download | libgit2-62d38a1ddb8081f8b46e7ff6e21ebeb0014162d6.tar.gz | |
Add annotated commit versions of reflog-modifying functions
We do not always want to put the id directly into the reflog, but we
want to speicfy what a user typed. For this use-case we provide
annotated version of a few functions which let the caller specify what
user-friendly name was used when asking for the operation.
Diffstat (limited to 'include/git2/repository.h')
| -rw-r--r-- | include/git2/repository.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h index e3ff3b375..ce56fef0f 100644 --- a/include/git2/repository.h +++ b/include/git2/repository.h @@ -630,6 +630,22 @@ GIT_EXTERN(int) git_repository_set_head_detached( const git_oid* commitish); /** + * Make the repository HEAD directly point to the Commit. + * + * This behaves like `git_repository_set_head_detached()` but takes an + * annotated commit, which lets you specify which extended sha syntax + * string was specified by a user, allowing for more exact reflog + * messages. + * + * See the documentation for `git_repository_set_head_detached()`. + * + * @see git_repository_set_head_detached + */ +GIT_EXTERN(int) git_repository_set_head_detached_from_annotated( + git_repository *repo, + const git_annotated_commit *commitish); + +/** * Detach the HEAD. * * If the HEAD is already detached and points to a Commit, 0 is returned. |
