summaryrefslogtreecommitdiff
path: root/builtin/worktree.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-06-05 14:40:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-11 16:41:01 (GMT)
commit3c87aa946a9ffc31cf1355b11e63df7c3315a2f9 (patch)
tree30880fd6d627b4e9dc6a7640146e5a9620bf8b01 /builtin/worktree.c
parente4d2d55ae46216872c9eaa3b9d0072aa8361d5d3 (diff)
downloadgit-3c87aa946a9ffc31cf1355b11e63df7c3315a2f9.zip
git-3c87aa946a9ffc31cf1355b11e63df7c3315a2f9.tar.gz
git-3c87aa946a9ffc31cf1355b11e63df7c3315a2f9.tar.bz2
checkout: pass the "num_matches" up to callers
Pass the previously added "num_matches" struct value up to the callers of unique_tracking_name(). This will allow callers to optionally print better error messages in a later change. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 5c7d2bb..a763dbd 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -412,7 +412,7 @@ static const char *dwim_branch(const char *path, const char **new_branch)
if (guess_remote) {
struct object_id oid;
const char *remote =
- unique_tracking_name(*new_branch, &oid);
+ unique_tracking_name(*new_branch, &oid, NULL);
return remote;
}
return NULL;
@@ -484,7 +484,7 @@ static int add(int ac, const char **av, const char *prefix)
commit = lookup_commit_reference_by_name(branch);
if (!commit) {
- remote = unique_tracking_name(branch, &oid);
+ remote = unique_tracking_name(branch, &oid, NULL);
if (remote) {
new_branch = branch;
branch = remote;