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

[PATCH 1/3] builtin/worktree: comment style fixes

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 29, 2024, 20:28 UTC
Message-ID
<20240129202839.2234084-2-gitster@pobox.com>
In-Reply-To
<20240129202839.2234084-1-gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/worktree.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 6d7da11746..9c76b62b02 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -848,21 +848,21 @@ static int add(int ac, const char **av, const char *prefix)
 		const char *s = worktree_basename(path, &n);
 		new_branch = xstrndup(s, n);
 	} else if (opts.orphan) {
-		// No-op
+		; /* no-op */
 	} else if (opts.detach) {
-		// Check HEAD
+		/* Check HEAD */
 		if (!strcmp(branch, "HEAD"))
 			can_use_local_refs(&opts);
 	} else if (ac < 2 && new_branch) {
-		// DWIM: Infer --orphan when repo has no refs.
+		/* DWIM: Infer --orphan when repo has no refs. */
 		opts.orphan = dwim_orphan(&opts, !!opt_track, 0);
 	} else if (ac < 2) {
-		// DWIM: Guess branch name from path.
+		/* DWIM: Guess branch name from path. */
 		const char *s = dwim_branch(path, &new_branch);
 		if (s)
 			branch = s;
 
-		// DWIM: Infer --orphan when repo has no refs.
+		/* DWIM: Infer --orphan when repo has no refs. */
 		opts.orphan = (!s) && dwim_orphan(&opts, !!opt_track, 1);
 	} else if (ac == 2) {
 		struct object_id oid;
-- 
2.43.0-440-gb50a608ba2
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 5 in “Comment style fixes”
  1. 0/3 Comment style fixesJunio C Hamano, Jan 29, 2024
  2. 1/3 builtin/worktree: comment style fixesJunio C Hamano, Jan 29, 2024
  3. 3/3 reftable/pq_test: comment style fixJunio C Hamano, Jan 29, 2024
  4. 2/3 merge-ort.c: comment style fixJunio C Hamano, Jan 29, 2024
  5. Patrick SteinhardtJan 30, 2024

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.