Nguyễn Thái Ngọc Duy  <pclo...@gmail.com> writes:

> +     if (is_main_worktree(wt))
> +             die(_("'%s' is a main working directory"), av[0]);
> +     if (!wt->lock_reason)
> +             die(_("'%s' is not locked"), av[0]);

Exactly the same comment about the lack of need for lock_reason
field as 5/6 appiles here.  Also, as "lock" does not allow you to
lock the primary tree, do you even need is_main_worktree() check?

That is:

        if (!worktree_is_locked(wt, &reason))
                die(_("'%s' is not locked), av[0]);

should be sufficient, no?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to