diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-19 11:33:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-19 11:33:57 -0800 |
commit | 66d3f19324ac9eeae8ef0d2ae2067ae7b18f8ac8 (patch) | |
tree | e94fa30407c0068170f6c19a94adadd66fcbeca7 /checkout.h | |
parent | 1974f4791af2b8720f2983149defe13e571b3884 (diff) | |
parent | e92445a73173cf21a11b8e79cb7be16485deec69 (diff) | |
download | git-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.h | 13 |
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 */ |