Re: [PATCH v3 6/6] worktree: add "unlock" command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]