diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2018-06-05 16:40:46 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-11 18:41:01 +0200 |
commit | 3c87aa946a9ffc31cf1355b11e63df7c3315a2f9 (patch) | |
tree | 30880fd6d627b4e9dc6a7640146e5a9620bf8b01 /builtin/worktree.c | |
parent | checkout.c: change "unique" member to "num_matches" (diff) | |
download | git-3c87aa946a9ffc31cf1355b11e63df7c3315a2f9.tar.xz git-3c87aa946a9ffc31cf1355b11e63df7c3315a2f9.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c index 5c7d2bb180..a763dbdccb 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; |