]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/comment-style-fixes' into maint-2.43
authorJunio C Hamano <gitster@pobox.com>
Tue, 13 Feb 2024 22:44:48 +0000 (14:44 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Feb 2024 22:44:48 +0000 (14:44 -0800)
Rewrite //-comments to /* comments */ in files whose comments
prevalently use the latter.

* jc/comment-style-fixes:
  reftable/pq_test: comment style fix
  merge-ort.c: comment style fix
  builtin/worktree: comment style fixes

builtin/worktree.c
merge-ort.c
reftable/pq_test.c

index cac83a94197dd60054d5266de8cc1b5186ea2b35..e1033c294f930ea8a1dbea23de6c92a0f3687bb7 100644 (file)
@@ -851,21 +851,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;
index 77ba7f3020c8c112bf2e6bff9dae78d4d0ca847b..cb83449d7f7340eaf5969256fe4fdc9d09911c64 100644 (file)
@@ -2641,7 +2641,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;
        }
 
index 011b5c75028a9d8dbad15f23ddb99d39e09ca9cb..c202eff84801820b28c56ddb7de28a2d041f3c08 100644 (file)
@@ -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);