{"thread":{"id":"60809","subject":"[PATCH 0/3] Comment style fixes","startedAt":"2024-01-29T20:28:42Z","lastAt":"2024-01-30T06:10:14Z","messageCount":5,"participants":["Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"487544","messageId":"20240129202839.2234084-1-gitster@pobox.com","threadId":"60809","inReplyTo":null,"subject":"[PATCH 0/3] Comment style fixes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-01-29T20:28:36Z","receivedAt":"2024-01-29T20:28:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Among comments in the traditional /* single liner */ ones, our\nreviews seem to have missed a few // comments.  While they are not\nillegal per-se, they look out of place mixed with the /* ... */\nstyle comments, which is the prevailing style used in this project.\n\nFix those small number of style violations in our own code; files\nwith borrowed code that have // comments as the prevalent style are\nleft untouched.\n\nJunio C Hamano (3):\n  builtin/worktree: comment style fixes\n  merge-ort.c: comment style fix\n  reftable/pq_test: comment style fix\n\n builtin/worktree.c | 10 +++++-----\n merge-ort.c        |  2 +-\n reftable/pq_test.c |  2 +-\n 3 files changed, 7 insertions(+), 7 deletions(-)\n\n-- \n2.43.0-440-gb50a608ba2\n"},{"id":"487545","messageId":"20240129202839.2234084-2-gitster@pobox.com","threadId":"60809","inReplyTo":"20240129202839.2234084-1-gitster@pobox.com","subject":"[PATCH 1/3] builtin/worktree: comment style fixes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-01-29T20:28:37Z","receivedAt":"2024-01-29T20:28:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/worktree.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/worktree.c b/builtin/worktree.c\nindex 6d7da11746..9c76b62b02 100644\n--- a/builtin/worktree.c\n+++ b/builtin/worktree.c\n@@ -848,21 +848,21 @@ static int add(int ac, const char **av, const char *prefix)\n \t\tconst char *s = worktree_basename(path, &n);\n \t\tnew_branch = xstrndup(s, n);\n \t} else if (opts.orphan) {\n-\t\t// No-op\n+\t\t; /* no-op */\n \t} else if (opts.detach) {\n-\t\t// Check HEAD\n+\t\t/* Check HEAD */\n \t\tif (!strcmp(branch, \"HEAD\"))\n \t\t\tcan_use_local_refs(&opts);\n \t} else if (ac < 2 && new_branch) {\n-\t\t// DWIM: Infer --orphan when repo has no refs.\n+\t\t/* DWIM: Infer --orphan when repo has no refs. */\n \t\topts.orphan = dwim_orphan(&opts, !!opt_track, 0);\n \t} else if (ac < 2) {\n-\t\t// DWIM: Guess branch name from path.\n+\t\t/* DWIM: Guess branch name from path. */\n \t\tconst char *s = dwim_branch(path, &new_branch);\n \t\tif (s)\n \t\t\tbranch = s;\n \n-\t\t// DWIM: Infer --orphan when repo has no refs.\n+\t\t/* DWIM: Infer --orphan when repo has no refs. */\n \t\topts.orphan = (!s) && dwim_orphan(&opts, !!opt_track, 1);\n \t} else if (ac == 2) {\n \t\tstruct object_id oid;\n-- \n2.43.0-440-gb50a608ba2\n\n"},{"id":"487546","messageId":"20240129202839.2234084-4-gitster@pobox.com","threadId":"60809","inReplyTo":"20240129202839.2234084-1-gitster@pobox.com","subject":"[PATCH 3/3] reftable/pq_test: comment style fix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-01-29T20:28:39Z","receivedAt":"2024-01-29T20:28:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <gitster@pobox.com>\n---\n reftable/pq_test.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/reftable/pq_test.c b/reftable/pq_test.c\nindex 011b5c7502..c202eff848 100644\n--- a/reftable/pq_test.c\n+++ b/reftable/pq_test.c\n@@ -60,7 +60,7 @@ static void test_pq(void)\n \t\tif (last) {\n \t\t\tEXPECT(strcmp(last, rec->u.ref.refname) < 0);\n \t\t}\n-\t\t// this is names[i], so don't dealloc.\n+\t\t/* this is names[i], so don't dealloc. */\n \t\tlast = rec->u.ref.refname;\n \t\trec->u.ref.refname = NULL;\n \t\treftable_record_release(rec);\n-- \n2.43.0-440-gb50a608ba2\n\n"},{"id":"487547","messageId":"20240129202839.2234084-3-gitster@pobox.com","threadId":"60809","inReplyTo":"20240129202839.2234084-1-gitster@pobox.com","subject":"[PATCH 2/3] merge-ort.c: comment style fix","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-01-29T20:28:38Z","receivedAt":"2024-01-29T20:28:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <gitster@pobox.com>\n---\n merge-ort.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/merge-ort.c b/merge-ort.c\nindex 77ba7f3020..cb83449d7f 100644\n--- a/merge-ort.c\n+++ b/merge-ort.c\n@@ -2641,7 +2641,7 @@ static void apply_directory_rename_modifications(struct merge_options *opt,\n \t\t\toidcpy(&ci->stages[i].oid, null_oid());\n \t\t}\n \n-\t\t// Now we want to focus on new_ci, so reassign ci to it\n+\t\t/* Now we want to focus on new_ci, so reassign ci to it. */\n \t\tci = new_ci;\n \t}\n \n-- \n2.43.0-440-gb50a608ba2\n\n"},{"id":"487589","messageId":"ZbiSwAbRaxXXfLMk@tanuki","threadId":"60809","inReplyTo":"20240129202839.2234084-1-gitster@pobox.com","subject":"Re: [PATCH 0/3] Comment style fixes","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-01-30T06:10:08Z","receivedAt":"2024-01-30T06:10:14Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Jan 29, 2024 at 12:28:36PM -0800, Junio C Hamano wrote:\n> Among comments in the traditional /* single liner */ ones, our\n> reviews seem to have missed a few // comments.  While they are not\n> illegal per-se, they look out of place mixed with the /* ... */\n> style comments, which is the prevailing style used in this project.\n> \n> Fix those small number of style violations in our own code; files\n> with borrowed code that have // comments as the prevalent style are\n> left untouched.\n\nThese changes look obviously good to me, thanks!\n\nPatrick\n"}]}