Re: What's cooking in git.git (Apr 2017, #04; Wed, 19)
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 20, 2017, 09:59 UTC
- Message-ID
- <20170420095921.GA23873@ash>
- In-Reply-To
- <xmqq4lxjabce.fsf@gitster.mtv.corp.google.com>
On Wed, Apr 19, 2017 at 10:37:21PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> * nd/worktree-add-lock (2017-04-16) 2 commits > - SQUASH??? > - worktree add: add --lock option > > Allow to lock a worktree immediately after it's created. This helps > prevent a race between "git worktree add; git worktree lock" and > "git worktree prune". > > Waiting for a response to SQUASH???
Looking good. I would add some comment, lest ';' feel lonely. But it's really personal taste.
-- 8< --
diff --git a/builtin/worktree.c b/builtin/worktree.c index 5ebdcce793..bc75676bf3 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -310,7 +310,7 @@ static int add_worktree(const char *path, const char *refname, strbuf_reset(&sb); strbuf_addf(&sb, "%s/locked", sb_repo.buf); if (!ret && opts->keep_locked) - ; + ; /* --lock wants to keep "locked" file */ else unlink_or_warn(sb.buf); argv_array_clear(&child_env); -- 8< --