builtin-for-each-ref.c: comment fixes
The primary purpose of this is to get rid of stale comments that lamented the lack of callback parameter from for_each_ref() which we have already fixed. While at it we adjust the multi-line comment style to match the style convention. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Feb 13, 2010 at 11:29 UTC
40dae3094db123be664c69b356b6e4f4e33d80e6
1 file changed
+16
-10
builtin-for-each-ref.c
+16
-10
@@ -143,7 +143,8 @@ static const char *find_next(const char *cp)
143
{
144
while (*cp) {
145
if (*cp == '%') {
146
- /* %( is the start of an atom;
146
+ /*
147
+ * %( is the start of an atom;
148
* %% is a quoted per-cent.
149
*/
150
if (cp[1] == '(')
@@ -420,7 +421,8 @@ static void grab_person(const char *who, struct atom_value *val, int deref, stru
421
grab_date(wholine, v, name);
422
}
423
423
- /* For a tag or a commit object, if "creator" or "creatordate" is
424
+ /*
425
+ * For a tag or a commit object, if "creator" or "creatordate" is
426
* requested, do something special.
427
*/
428
if (strcmp(who, "tagger") && strcmp(who, "committer"))
@@ -502,7 +504,8 @@ static void grab_sub_body_contents(struct atom_value *val, int deref, struct obj
504
}
505
}
506
505
-/* We want to have empty print-string for field requests
507
+/*
508
+ * We want to have empty print-string for field requests
509
* that do not apply (e.g. "authordate" for a tag object)
510
*/
511
static void fill_missing_values(struct atom_value *val)
@@ -633,18 +636,21 @@ static void populate_value(struct refinfo *ref)
636
if (!eaten)
637
free(buf);
638
636
- /* If there is no atom that wants to know about tagged
639
+ /*
640
+ * If there is no atom that wants to know about tagged
641
* object, we are done.
642
*/
643
if (!need_tagged || (obj->type != OBJ_TAG))
644
return;
645
642
- /* If it is a tag object, see if we use a value that derefs
646
+ /*
647
+ * If it is a tag object, see if we use a value that derefs
648
* the object, and if we do grab the object it refers to.
649
*/
650
tagged = ((struct tag *)obj)->tagged->sha1;
651
647
- /* NEEDSWORK: This derefs tag only once, which
652
+ /*
653
+ * NEEDSWORK: This derefs tag only once, which
654
* is good to deal with chains of trust, but
655
* is not consistent with what deref_tag() does
656
* which peels the onion to the core.
@@ -681,9 +687,8 @@ struct grab_ref_cbdata {
687
};
688
689
/*
684
- * A call-back given to for_each_ref(). It is unfortunate that we
685
- * need to use global variables to pass extra information to this
686
- * function.
690
+ * A call-back given to for_each_ref(). Filter refs and keep them for
691
+ * later object processing.
692
*/
693
static int grab_single_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
694
{
@@ -711,7 +716,8 @@ static int grab_single_ref(const char *refname, const unsigned char *sha1, int f
716
return 0;
717
}
718
714
- /* We do not open the object yet; sort may only need refname
719
+ /*
720
+ * We do not open the object yet; sort may only need refname
721
* to do its job and the resulting list may yet to be pruned
722
* by maxcount logic.
723
*/