From 777f7838415f6e83c350a39b8119e38794a04739 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 29 Jan 2024 12:28:37 -0800 Subject: builtin/worktree: comment style fixes Signed-off-by: Junio C Hamano --- builtin/worktree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/worktree.c b/builtin/worktree.c index 62b7e26f4b..aba8a2fcaf 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -850,21 +850,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; -- cgit 1.2.3-korg From 9d2cdd8ae85694a6920aa2a2242f95a226a02898 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 29 Jan 2024 12:28:38 -0800 Subject: merge-ort.c: comment style fix Signed-off-by: Junio C Hamano --- merge-ort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/merge-ort.c b/merge-ort.c index 6491070d96..6fd9d06420 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -2644,7 +2644,7 @@ static void apply_directory_rename_modifications(struct merge_options *opt, oidcpy(&ci->stages[i].oid, null_oid()); } - // Now we want to focus on new_ci, so reassign ci to it + /* Now we want to focus on new_ci, so reassign ci to it. */ ci = new_ci; } -- cgit 1.2.3-korg From de65079d7b2801316e398b8806a60607ba45c520 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 29 Jan 2024 12:28:39 -0800 Subject: reftable/pq_test: comment style fix Signed-off-by: Junio C Hamano --- reftable/pq_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reftable/pq_test.c b/reftable/pq_test.c index 011b5c7502..c202eff848 100644 --- a/reftable/pq_test.c +++ b/reftable/pq_test.c @@ -60,7 +60,7 @@ static void test_pq(void) if (last) { EXPECT(strcmp(last, rec->u.ref.refname) < 0); } - // this is names[i], so don't dealloc. + /* this is names[i], so don't dealloc. */ last = rec->u.ref.refname; rec->u.ref.refname = NULL; reftable_record_release(rec); -- cgit 1.2.3-korg