]> git.ipfire.org Git - thirdparty/git.git/blobdiff - branch.c
git maintenance: avoid console window in scheduled tasks on Windows
[thirdparty/git.git] / branch.c
index 9415ee3f3408120daa4670f560d553051d85b361..ba3914adf5b7bfdccd5b76774e1287bf52d1e749 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -840,30 +840,3 @@ void die_if_checked_out(const char *branch, int ignore_current_worktree)
 
        free_worktrees(worktrees);
 }
-
-int replace_each_worktree_head_symref(const char *oldref, const char *newref,
-                                     const char *logmsg)
-{
-       int ret = 0;
-       struct worktree **worktrees = get_worktrees();
-       int i;
-
-       for (i = 0; worktrees[i]; i++) {
-               struct ref_store *refs;
-
-               if (worktrees[i]->is_detached)
-                       continue;
-               if (!worktrees[i]->head_ref)
-                       continue;
-               if (strcmp(oldref, worktrees[i]->head_ref))
-                       continue;
-
-               refs = get_worktree_ref_store(worktrees[i]);
-               if (refs_create_symref(refs, "HEAD", newref, logmsg))
-                       ret = error(_("HEAD of working tree %s is not updated"),
-                                   worktrees[i]->path);
-       }
-
-       free_worktrees(worktrees);
-       return ret;
-}