git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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< --
Previous: Junio C HamanoNext: Jeff King
Message 2 of 29 in “What's cooking in git.git (Apr 2017, #04; Wed, 19)”
  1. Junio C HamanoApr 20, 2017
  2. Duy NguyenApr 20, 2017
  3. Jeff KingApr 20, 2017
  4. Junio C HamanoApr 20, 2017
  5. Junio C HamanoApr 20, 2017
  6. Lars SchneiderApr 20, 2017
  7. Junio C HamanoApr 20, 2017
  8. Johannes SchindelinApr 20, 2017
  9. Brandon WilliamsApr 20, 2017
  10. Brandon WilliamsApr 20, 2017
  11. Junio C HamanoApr 21, 2017
  12. Junio C HamanoApr 20, 2017
  13. Johannes SchindelinApr 21, 2017
  14. Christian CouderApr 21, 2017
  15. Johannes SchindelinApr 22, 2017
  16. Christian CouderApr 22, 2017
  17. Johannes SchindelinApr 24, 2017
  18. Johannes SixtApr 22, 2017
  19. Johannes SchindelinApr 24, 2017
  20. Philip OakleyApr 24, 2017
  21. Christian CouderApr 25, 2017
  22. Christian CouderApr 25, 2017
  23. Johannes SixtApr 25, 2017
  24. Junio C HamanoApr 25, 2017
  25. Johannes SixtApr 25, 2017
  26. Junio C HamanoApr 24, 2017
  27. Johannes SchindelinApr 24, 2017
  28. Ævar Arnfjörð BjarmasonApr 24, 2017
  29. Junio C HamanoApr 25, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.