We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81eff27 commit c871714Copy full SHA for c871714
worktree.c
@@ -229,18 +229,20 @@ const struct worktree *find_shared_symref(const char *symref,
229
worktrees = get_worktrees();
230
231
for (i = 0; worktrees[i]; i++) {
232
+ struct worktree *wt = worktrees[i];
233
+
234
strbuf_reset(&path);
235
strbuf_reset(&sb);
236
strbuf_addf(&path, "%s/%s",
- get_worktree_git_dir(worktrees[i]),
237
+ get_worktree_git_dir(wt),
238
symref);
239
240
if (parse_ref(path.buf, &sb, NULL)) {
241
continue;
242
}
243
244
if (!strcmp(sb.buf, target)) {
- existing = worktrees[i];
245
+ existing = wt;
246
break;
247
248
0 commit comments