Merge branch 'jc/compression-config'
[gitweb.git] / builtin / worktree.c
index b835b91f636b02923eb0b113f10794a57008a463..9a97e37a3fa53e730f0963f8f00bbca9f6d6efc6 100644 (file)
@@ -447,7 +447,7 @@ static int list(int ac, const char **av, const char *prefix)
        if (ac)
                usage_with_options(worktree_usage, options);
        else {
-               struct worktree **worktrees = get_worktrees();
+               struct worktree **worktrees = get_worktrees(GWT_SORT_LINKED);
                int path_maxlen = 0, abbrev = DEFAULT_ABBREV, i;
 
                if (!porcelain)
@@ -478,7 +478,7 @@ static int lock_worktree(int ac, const char **av, const char *prefix)
        if (ac != 1)
                usage_with_options(worktree_usage, options);
 
-       worktrees = get_worktrees();
+       worktrees = get_worktrees(0);
        wt = find_worktree(worktrees, prefix, av[0]);
        if (!wt)
                die(_("'%s' is not a working tree"), av[0]);
@@ -511,7 +511,7 @@ static int unlock_worktree(int ac, const char **av, const char *prefix)
        if (ac != 1)
                usage_with_options(worktree_usage, options);
 
-       worktrees = get_worktrees();
+       worktrees = get_worktrees(0);
        wt = find_worktree(worktrees, prefix, av[0]);
        if (!wt)
                die(_("'%s' is not a working tree"), av[0]);