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

> v4
>
>  - fixes some documentation bugs in v3
>
>  - updates is_main_worktree commit message a bit
>
>  - brings back is_worktree_locked() as API with value lazily obtained
>    and cached in worktree->lock_reason and fixes a memory leak
>
>  - extends basename search to path suffix search. I moved this patch
>    to the bottom so that the relevant documentation part is included
>    in the patch (previously it was part of the "add lock command"
>    patch).
>
> This series is based on nd/worktree-cleanup-post-head-protection

Will replace the one in 'pu'.  A few things I noticed:

 * Documentation and messages talk about "working tree" and "working
   directory" when they refer to "worktree", which is not a normal
   "working tree".  I think this was done as an attempt to avoid
   being too precise and technical in phrasing, but I suspect that
   is a false reader-friendliness.  At least, "working directory" in
   messages should be "worktree", e.g.

        wt = find_worktree(...);
        if (!wt)
                die("'%s' is not a working directory", av[0]);

   does not make much sense (imagine "git wt lock ." and being told
   that '.' is not a working directory).

 * You are probably trying to be frugal by not introducing a
   separate bit for is_lock_checked to struct worktre and instead
   using a sentinel value for lock_reason, but I think that is a
   false economy, after seeing that you have to cast away constness
   in number of places and having to be extra careful not to free
   that sentinel value.

Thanks.
--
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