diff options
author | nulltoken <emeric.fermas@gmail.com> | 2013-05-14 16:40:09 +0200 |
---|---|---|
committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2013-11-23 13:35:53 +0100 |
commit | ca84e058505a25b8f789ee1298a83e818b297ecc (patch) | |
tree | c1ca409bf858d69063cf7512c2129d706ea52c78 /include/git2/refs.h | |
parent | 14ab0e100e9474c5d1fda37fb0f4eec9ee0e9d13 (diff) | |
download | libgit2-ca84e058505a25b8f789ee1298a83e818b297ecc.tar.gz |
refs: Introduce git_reference_symbolic_set_target_with_log()
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r-- | include/git2/refs.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index 172fdd284..2dc137692 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -319,6 +319,31 @@ GIT_EXTERN(int) git_reference_symbolic_set_target( /** * Create a new reference with the same name as the given reference but a + * different symbolic target and update the reflog with a given message. + * + * The reference must be a symbolic reference, otherwise this will fail. + * + * The new reference will be written to disk, overwriting the given reference. + * + * The target name will be checked for validity. + * See `git_reference_create_symbolic()` for rules about valid names. + * + * @param out Pointer to the newly created reference + * @param ref The reference + * @param target The new target for the reference + * @param signature The identity that will used to populate the reflog entry + * @param log_message The one line long message that has to be appended + * @return 0 on success, EINVALIDSPEC or an error code + */ +GIT_EXTERN(int) git_reference_symbolic_set_target_with_log( + git_reference **out, + git_reference *ref, + const char *target, + const git_signature *signature, + const char *log_message); + +/** + * Create a new reference with the same name as the given reference but a * different OID target. The reference must be a direct reference, otherwise * this will fail. * |