aboutsummaryrefslogtreecommitdiff
path: root/checkout.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-19 11:33:57 -0800
committerJunio C Hamano <gitster@pobox.com>2017-12-19 11:33:57 -0800
commit66d3f19324ac9eeae8ef0d2ae2067ae7b18f8ac8 (patch)
treee94fa30407c0068170f6c19a94adadd66fcbeca7 /checkout.h
parent1974f4791af2b8720f2983149defe13e571b3884 (diff)
parente92445a73173cf21a11b8e79cb7be16485deec69 (diff)
downloadgit-66d3f19324ac9eeae8ef0d2ae2067ae7b18f8ac8.tar.gz
git-66d3f19324ac9eeae8ef0d2ae2067ae7b18f8ac8.tar.xz
Merge branch 'tg/worktree-create-tracking'
The way "git worktree add" determines what branch to create from where and checkout in the new worktree has been updated a bit. * tg/worktree-create-tracking: add worktree.guessRemote config option worktree: add --guess-remote flag to add subcommand worktree: make add <path> <branch> dwim worktree: add --[no-]track option to the add subcommand worktree: add can be created from any commit-ish checkout: factor out functions to new lib file
Diffstat (limited to 'checkout.h')
-rw-r--r--checkout.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/checkout.h b/checkout.h
new file mode 100644
index 000000000..998071117
--- /dev/null
+++ b/checkout.h
@@ -0,0 +1,13 @@
+#ifndef CHECKOUT_H
+#define CHECKOUT_H
+
+#include "cache.h"
+
+/*
+ * Check if the branch name uniquely matches a branch name on a remote
+ * tracking branch. Return the name of the remote if such a branch
+ * exists, NULL otherwise.
+ */
+extern const char *unique_tracking_name(const char *name, struct object_id *oid);
+
+#endif /* CHECKOUT_H */