summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-03 06:42:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-03 06:42:48 (GMT)
commit3b48045c6c73a51834a2f83440a30225485ee431 (patch)
treeca7e9460aaadd4e6f26414c86bd72df6ab371fb8 /refs.h
parentb2a2c4d8099c69ec997e51cac489c0947ad17956 (diff)
parente5435ff1fc64d93cce73ec4ee2571219384a92a9 (diff)
downloadgit-3b48045c6c73a51834a2f83440a30225485ee431.zip
git-3b48045c6c73a51834a2f83440a30225485ee431.tar.gz
git-3b48045c6c73a51834a2f83440a30225485ee431.tar.bz2
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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index e1c5803..a02b628 100644
--- a/refs.h
+++ b/refs.h
@@ -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);