diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:48 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-03 15:42:48 +0900 |
commit | 3b48045c6c73a51834a2f83440a30225485ee431 (patch) | |
tree | ca7e9460aaadd4e6f26414c86bd72df6ab371fb8 /refs.h | |
parent | b2a2c4d8099c69ec997e51cac489c0947ad17956 (diff) | |
parent | e5435ff1fc64d93cce73ec4ee2571219384a92a9 (diff) | |
download | git-3b48045c6c73a51834a2f83440a30225485ee431.tar.gz |
Merge branch 'sd/branch-copy'
"git branch" learned "-c/-C" to create a new branch by copying an
existing one.
* sd/branch-copy:
branch: fix "copy" to never touch HEAD
branch: add a --copy (-c) option to go with --move (-m)
branch: add test for -m renaming multiple config sections
config: create a function to format section headers
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -442,7 +442,14 @@ char *shorten_unambiguous_ref(const char *refname, int strict); /** rename ref, return 0 on success **/ int refs_rename_ref(struct ref_store *refs, const char *oldref, const char *newref, const char *logmsg); -int rename_ref(const char *oldref, const char *newref, const char *logmsg); +int rename_ref(const char *oldref, const char *newref, + const char *logmsg); + +/** copy ref, return 0 on success **/ +int refs_copy_existing_ref(struct ref_store *refs, const char *oldref, + const char *newref, const char *logmsg); +int copy_existing_ref(const char *oldref, const char *newref, + const char *logmsg); int refs_create_symref(struct ref_store *refs, const char *refname, const char *target, const char *logmsg); |