aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-02-06 14:31:21 -0800
committerJunio C Hamano <gitster@pobox.com>2024-02-06 14:31:21 -0800
commit184c3b4c735f1c1f0f811fddcf3c2676e7ad613f (patch)
treecb31e7c1b5065683639f51189c135a180281562b
parent92e69dfb66fa5c760e2d1f76c8a21cdb6faacaee (diff)
parentde65079d7b2801316e398b8806a60607ba45c520 (diff)
downloadgit-184c3b4c735f1c1f0f811fddcf3c2676e7ad613f.tar.gz
Merge branch 'jc/comment-style-fixes'
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
-rw-r--r--builtin/worktree.c10
-rw-r--r--merge-ort.c2
-rw-r--r--reftable/pq_test.c2
3 files changed, 7 insertions, 7 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;
diff --git a/merge-ort.c b/merge-ort.c
index d72fd04f58..8617babee4 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -2642,7 +2642,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;
}
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);