Skip to content

Commit 8929455

Browse files
avargitster
authored andcommitted
post-cocci: adjust comments for recent repo_* migration
In preceding commits we changed many calls to macros that were providing a "the_repository" argument to invoke corresponding repo_*() function instead. Let's follow-up and adjust references to those in comments, which coccinelle didn't (and inherently can't) catch. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 10995dd commit 8929455

File tree

11 files changed

+18
-18
lines changed

11 files changed

+18
-18
lines changed

builtin/branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int branch_merged(int kind, const char *name,
156156
/*
157157
* After the safety valve is fully redefined to "check with
158158
* upstream, if any, otherwise with HEAD", we should just
159-
* return the result of the in_merge_bases() above without
159+
* return the result of the repo_in_merge_bases() above without
160160
* any of the following code, but during the transition period,
161161
* a gentle reminder is in order.
162162
*/

builtin/shortlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static void insert_records_from_trailers(struct shortlog *log,
176176
return;
177177

178178
/*
179-
* Using format_commit_message("%B") would be simpler here, but
179+
* Using repo_format_commit_message("%B") would be simpler here, but
180180
* this saves us copying the message.
181181
*/
182182
commit_buffer = repo_logmsg_reencode(the_repository, commit, NULL,

cache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ void validate_cache_entries(const struct index_state *istate);
443443
/*
444444
* Bulk prefetch all missing cache entries that are not GITLINKs and that match
445445
* the given predicate. This function should only be called if
446-
* has_promisor_remote() returns true.
446+
* repo_has_promisor_remote() returns true.
447447
*/
448448
typedef int (*must_prefetch_predicate)(const struct cache_entry *);
449449
void prefetch_cache_entries(const struct index_state *istate,
@@ -1201,7 +1201,7 @@ void check_repository_format(struct repository_format *fmt);
12011201
* terminated.
12021202
*
12031203
* The non-`_r` version returns a static buffer which remains valid until 4
1204-
* more calls to find_unique_abbrev are made.
1204+
* more calls to repo_find_unique_abbrev are made.
12051205
*
12061206
* The `_r` variant writes to a buffer supplied by the caller, which must be at
12071207
* least `GIT_MAX_HEXSZ + 1` bytes. The return value is the number of bytes

commit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const void *get_cached_commit_buffer(struct repository *, const struct commit *,
130130
/*
131131
* Get the commit's object contents, either from cache or by reading the object
132132
* from disk. The resulting memory should not be modified, and must be given
133-
* to unuse_commit_buffer when the caller is done.
133+
* to repo_unuse_commit_buffer when the caller is done.
134134
*/
135135
const void *repo_get_commit_buffer(struct repository *r,
136136
const struct commit *,
@@ -139,7 +139,7 @@ const void *repo_get_commit_buffer(struct repository *r,
139139
/*
140140
* Tell the commit subsystem that we are done with a particular commit buffer.
141141
* The commit and buffer should be the input and return value, respectively,
142-
* from an earlier call to get_commit_buffer. The buffer may or may not be
142+
* from an earlier call to repo_get_commit_buffer. The buffer may or may not be
143143
* freed by this call; callers should not access the memory afterwards.
144144
*/
145145
void repo_unuse_commit_buffer(struct repository *r,

diff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);
614614
#define DIFF_STATUS_FILTER_BROKEN 'B'
615615

616616
/*
617-
* This is different from find_unique_abbrev() in that
617+
* This is different from repo_find_unique_abbrev() in that
618618
* it stuffs the result with dots for alignment.
619619
*/
620620
const char *diff_aligned_abbrev(const struct object_id *sha1, int);

object-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ int hash_algo_by_length(int len)
267267

268268
/*
269269
* This is meant to hold a *small* number of objects that you would
270-
* want read_object_file() to be able to return, but yet you do not want
270+
* want repo_read_object_file() to be able to return, but yet you do not want
271271
* to write them into the object store (e.g. a browse-only
272272
* application).
273273
*/

object-store.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ struct raw_object_store {
216216
/*
217217
* A fast, rough count of the number of objects in the repository.
218218
* These two fields are not meant for direct access. Use
219-
* approximate_object_count() instead.
219+
* repo_approximate_object_count() instead.
220220
*/
221221
unsigned long approximate_object_count;
222222
unsigned approximate_object_count_valid : 1;
@@ -343,7 +343,7 @@ void assert_oid_type(const struct object_id *oid, enum object_type expect);
343343

344344
/*
345345
* Enabling the object read lock allows multiple threads to safely call the
346-
* following functions in parallel: repo_read_object_file(), read_object_file(),
346+
* following functions in parallel: repo_read_object_file(),
347347
* read_object_with_reference(), oid_object_info() and oid_object_info_extended().
348348
*
349349
* obj_read_lock() and obj_read_unlock() may also be used to protect other

pretty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ const char *repo_logmsg_reencode(struct repository *r,
719719
* Otherwise, we still want to munge the encoding header in the
720720
* result, which will be done by modifying the buffer. If we
721721
* are using a fresh copy, we can reuse it. But if we are using
722-
* the cached copy from get_commit_buffer, we need to duplicate it
722+
* the cached copy from repo_get_commit_buffer, we need to duplicate it
723723
* to avoid munging the cached copy.
724724
*/
725725
if (msg == get_cached_commit_buffer(r, commit, NULL))

refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ const char *refs_resolve_ref_unsafe(struct ref_store *refs,
18211821
return NULL;
18221822

18231823
/*
1824-
* dwim_ref() uses REF_ISBROKEN to distinguish between
1824+
* repo_dwim_ref() uses REF_ISBROKEN to distinguish between
18251825
* missing refs and refs that were present but invalid,
18261826
* to complain about the latter to stderr.
18271827
*

sequencer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,9 +768,9 @@ static int is_index_unchanged(struct repository *r)
768768
/*
769769
* If head_commit is NULL, check_commit, called from
770770
* lookup_commit, would have indicated that head_commit is not
771-
* a commit object already. parse_commit() will return failure
771+
* a commit object already. repo_parse_commit() will return failure
772772
* without further complaints in such a case. Otherwise, if
773-
* the commit is invalid, parse_commit() will complain. So
773+
* the commit is invalid, repo_parse_commit() will complain. So
774774
* there is nothing for us to say here. Just return failure.
775775
*/
776776
if (repo_parse_commit(the_repository, head_commit))
@@ -5365,7 +5365,7 @@ static const char *label_oid(struct object_id *oid, const char *label,
53655365
* For "uninteresting" commits, i.e. commits that are not to be
53665366
* rebased, and which can therefore not be labeled, we use a unique
53675367
* abbreviation of the commit name. This is slightly more complicated
5368-
* than calling find_unique_abbrev() because we also need to make
5368+
* than calling repo_find_unique_abbrev() because we also need to make
53695369
* sure that the abbreviation does not conflict with any other
53705370
* label.
53715371
*

strbuf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ void strbuf_add_separated_string_list(struct strbuf *str,
631631
void strbuf_list_free(struct strbuf **list);
632632

633633
/**
634-
* Add the abbreviation, as generated by find_unique_abbrev, of `sha1` to
634+
* Add the abbreviation, as generated by repo_find_unique_abbrev(), of `sha1` to
635635
* the strbuf `sb`.
636636
*/
637637
struct repository;
@@ -706,14 +706,14 @@ static inline void strbuf_complete_line(struct strbuf *sb)
706706

707707
/*
708708
* Copy "name" to "sb", expanding any special @-marks as handled by
709-
* interpret_branch_name(). The result is a non-qualified branch name
709+
* repo_interpret_branch_name(). The result is a non-qualified branch name
710710
* (so "foo" or "origin/master" instead of "refs/heads/foo" or
711711
* "refs/remotes/origin/master").
712712
*
713713
* Note that the resulting name may not be a syntactically valid refname.
714714
*
715715
* If "allowed" is non-zero, restrict the set of allowed expansions. See
716-
* interpret_branch_name() for details.
716+
* repo_interpret_branch_name() for details.
717717
*/
718718
void strbuf_branchname(struct strbuf *sb, const char *name,
719719
unsigned allowed);

0 commit comments

Comments
 (0)