Fix spelling errors in code comments
Reported-by: Jens Schleusener <Jens.Schleusener@fossies.org> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Nov 5, 2019 at 17:07 UTC
15beaaa3d1f6b555900446deb5e376b4f806d734
35 files changed
+52
-52
apply.c
+2
-2
@@ -4183,8 +4183,8 @@ static void show_rename_copy(struct patch *p)
4183
old_name = slash_old + 1;
4184
new_name = slash_new + 1;
4185
}
4186
- /* p->old_name thru old_name is the common prefix, and old_name and new_name
4187
- * through the end of names are renames
4186
+ /* p->old_name through old_name is the common prefix, and old_name and
4187
+ * new_name through the end of names are renames
4188
*/
4189
if (old_name != p->old_name)
4190
printf(" %s %.*s{%s => %s} (%d%%)\n", renamecopy,
builtin/fetch.c
+1
-1
@@ -1400,7 +1400,7 @@ static int do_fetch(struct transport *transport,
1400
1401
/*
1402
* We're setting the upstream configuration for the
1403
- * current branch. The relevent upstream is the
1403
+ * current branch. The relevant upstream is the
1404
* fetched branch that is meant to be merged with the
1405
* current one, i.e. the one fetched to FETCH_HEAD.
1406
*
builtin/gc.c
+2
-2
@@ -458,7 +458,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
458
/*
459
* Returns 0 if there was no previous error and gc can proceed, 1 if
460
* gc should not proceed due to an error in the last run. Prints a
461
- * message and returns -1 if an error occured while reading gc.log
461
+ * message and returns -1 if an error occurred while reading gc.log
462
*/
463
static int report_last_gc_error(void)
464
{
@@ -601,7 +601,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
601
if (detach_auto) {
602
int ret = report_last_gc_error();
603
if (ret < 0)
604
- /* an I/O error occured, already reported */
604
+ /* an I/O error occurred, already reported */
605
exit(128);
606
if (ret == 1)
607
/* Last gc --auto failed. Skip this one. */
builtin/pack-objects.c
+1
-1
@@ -163,7 +163,7 @@ static void *get_delta(struct object_entry *entry)
163
delta_buf = diff_delta(base_buf, base_size,
164
buf, size, &delta_size, 0);
165
/*
166
- * We succesfully computed this delta once but dropped it for
166
+ * We successfully computed this delta once but dropped it for
167
* memory reasons. Something is very wrong if this time we
168
* recompute and create a different delta.
169
*/
commit-graph.c
+1
-1
@@ -461,7 +461,7 @@ static void prepare_commit_graph_one(struct repository *r, const char *obj_dir)
461
/*
462
* Return 1 if commit_graph is non-NULL, and 0 otherwise.
463
*
464
- * On the first invocation, this function attemps to load the commit
464
+ * On the first invocation, this function attempts to load the commit
465
* graph if the_repository is configured to have one.
466
*/
467
static int prepare_commit_graph(struct repository *r)
commit.h
+1
-1
@@ -132,7 +132,7 @@ const void *repo_get_commit_buffer(struct repository *r,
132
#endif
133
134
/*
135
- * Tell the commit subsytem that we are done with a particular commit buffer.
135
+ * Tell the commit subsystem that we are done with a particular commit buffer.
136
* The commit and buffer should be the input and return value, respectively,
137
* from an earlier call to get_commit_buffer. The buffer may or may not be
138
* freed by this call; callers should not access the memory afterwards.
compat/mingw.h
+1
-1
@@ -558,7 +558,7 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen);
558
559
/*
560
* A critical section used in the implementation of the spawn
561
- * functions (mingw_spawnv[p]e()) and waitpid(). Intialised in
561
+ * functions (mingw_spawnv[p]e()) and waitpid(). Initialised in
562
* the replacement main() macro below.
563
*/
564
extern CRITICAL_SECTION pinfo_cs;
compat/vcbuild/find_vs_env.bat
+1
-1
@@ -18,7 +18,7 @@ REM and MAKE, we must blend these two different worlds. This script
18
REM attempts to do that.
19
REM ================================================================
20
REM This BAT file starts in a plain (non-developer) command prompt,
21
-REM searches for the "best" commmand prompt setup script, installs
21
+REM searches for the "best" command prompt setup script, installs
22
REM it into the current CMD process, and exports the various MSVC
23
REM environment variables for use by MAKE.
24
REM
configure.ac
+1
-1
@@ -85,7 +85,7 @@ AC_DEFUN([GIT_PARSE_WITH],
85
86
# GIT_PARSE_WITH_SET_MAKE_VAR(WITHNAME, VAR, HELP_TEXT)
87
# -----------------------------------------------------
88
-# Set VAR to the value specied by --with-WITHNAME.
88
+# Set VAR to the value specified by --with-WITHNAME.
89
# No verification of arguments is performed, but warnings are issued
90
# if either 'yes' or 'no' is specified.
91
# HELP_TEXT is presented when --help is called.
contrib/coccinelle/commit.cocci
+1
-1
@@ -20,7 +20,7 @@ expression s;
20
+ set_commit_tree(c, s)
21
...>}
22
23
-// These excluded functions must access c->maybe_tree direcly.
23
+// These excluded functions must access c->maybe_tree directly.
24
// Note that if c->maybe_tree is written somewhere outside of these
25
// functions, then the recommended transformation will be bogus with
26
// repo_get_commit_tree() on the LHS.
contrib/completion/git-completion.bash
+2
-2
@@ -550,7 +550,7 @@ __git_index_files ()
550
esc_idx, 1)
551
} else if (esc == "n") {
552
# Uh-oh, a newline character.
553
- # We cant reliably put a pathname
553
+ # We cannot reliably put a pathname
554
# containing a newline into COMPREPLY,
555
# and the newline would create a mess.
556
# Skip this path.
@@ -565,7 +565,7 @@ __git_index_files ()
565
}
566
}
567
# Drop closing double quote, if there is one.
568
- # (There isnt any if this is a directory, as it was
568
+ # (There is not any if this is a directory, as it was
569
# already stripped with the trailing path components.)
570
if (substr(p, length(p), 1) == "\"")
571
out = out substr(p, 1, length(p) - 1)
contrib/hooks/post-receive-email
+1
-1
@@ -329,7 +329,7 @@ generate_update_branch_email()
329
#
330
# git rev-parse --not --all | grep -v $(git rev-parse $refname)
331
#
332
- # Get's us to something pretty safe (apart from the small time
332
+ # Gets us to something pretty safe (apart from the small time
333
# between refname being read, and git rev-parse running - for that,
334
# I give up)
335
#
convert.c
+1
-1
@@ -418,7 +418,7 @@ static int encode_to_git(const char *path, const char *src, size_t src_len,
418
if (!dst) {
419
/*
420
* We could add the blob "as-is" to Git. However, on checkout
421
- * we would try to reencode to the original encoding. This
421
+ * we would try to re-encode to the original encoding. This
422
* would fail and we would leave the user with a messed-up
423
* working tree. Let's try to avoid this by screaming loud.
424
*/
daemon.c
+2
-2
@@ -598,7 +598,7 @@ static void canonicalize_client(struct strbuf *out, const char *in)
598
* Read the host as supplied by the client connection.
599
*
600
* Returns a pointer to the character after the NUL byte terminating the host
601
- * arguemnt, or 'extra_args' if there is no host arguemnt.
601
+ * argument, or 'extra_args' if there is no host argument.
602
*/
603
static char *parse_host_arg(struct hostinfo *hi, char *extra_args, int buflen)
604
{
@@ -652,7 +652,7 @@ static void parse_extra_args(struct hostinfo *hi, struct argv_array *env,
652
* service that will be run.
653
*
654
* If there ends up being a particular arg in the future that
655
- * git-daemon needs to parse specificly (like the 'host' arg)
655
+ * git-daemon needs to parse specifically (like the 'host' arg)
656
* then it can be parsed here and not added to 'git_protocol'.
657
*/
658
if (*arg) {
diff.c
+2
-2
@@ -2551,7 +2551,7 @@ static int scale_linear(int it, int width, int max_change)
2551
/*
2552
* make sure that at least one '-' or '+' is printed if
2553
* there is any change to this path. The easiest way is to
2554
- * scale linearly as if the alloted width is one column shorter
2554
+ * scale linearly as if the allotted width is one column shorter
2555
* than it is, and then add 1 to the result.
2556
*/
2557
return 1 + (it * (width - 1) / max_change);
@@ -3196,7 +3196,7 @@ static int is_conflict_marker(const char *line, int marker_size, unsigned long l
3196
for (cnt = 1; cnt < marker_size; cnt++)
3197
if (line[cnt] != firstchar)
3198
return 0;
3199
- /* line[1] thru line[marker_size-1] are same as firstchar */
3199
+ /* line[1] through line[marker_size-1] are same as firstchar */
3200
if (len < marker_size + 1 || !isspace(line[marker_size]))
3201
return 0;
3202
return 1;
dir.c
+1
-1
@@ -2489,7 +2489,7 @@ static int remove_dir_recurse(struct strbuf *path, int flag, int *kept_up)
2489
* wanted anyway
2490
*/
2491
continue;
2492
- /* fall thru */
2492
+ /* fall through */
2493
} else if (S_ISDIR(st.st_mode)) {
2494
if (!remove_dir_recurse(path, flag, &kept_down))
2495
continue; /* happy */
git-send-email.perl
+1
-1
@@ -1228,7 +1228,7 @@ sub process_address_list {
1228
# domain name that corresponds the IP address in the HELO/EHLO
1229
# handshake. This is used to verify the connection and prevent
1230
# spammers from trying to hide their identity. If the DNS and IP don't
1231
-# match, the receiveing MTA may deny the connection.
1231
+# match, the receiving MTA may deny the connection.
1232
#
1233
# Here is a deny example of Net::SMTP with the default "localhost.localdomain"
1234
#
gitweb/gitweb.perl
+9
-9
@@ -1657,15 +1657,15 @@ sub quot_cec {
1657
my $cntrl = shift;
1658
my %opts = @_;
1659
my %es = ( # character escape codes, aka escape sequences
1660
- "\t" => '\t', # tab (HT)
1661
- "\n" => '\n', # line feed (LF)
1662
- "\r" => '\r', # carrige return (CR)
1663
- "\f" => '\f', # form feed (FF)
1664
- "\b" => '\b', # backspace (BS)
1665
- "\a" => '\a', # alarm (bell) (BEL)
1666
- "\e" => '\e', # escape (ESC)
1667
- "\013" => '\v', # vertical tab (VT)
1668
- "\000" => '\0', # nul character (NUL)
1660
+ "\t" => '\t', # tab (HT)
1661
+ "\n" => '\n', # line feed (LF)
1662
+ "\r" => '\r', # carriage return (CR)
1663
+ "\f" => '\f', # form feed (FF)
1664
+ "\b" => '\b', # backspace (BS)
1665
+ "\a" => '\a', # alarm (bell) (BEL)
1666
+ "\e" => '\e', # escape (ESC)
1667
+ "\013" => '\v', # vertical tab (VT)
1668
+ "\000" => '\0', # nul character (NUL)
1669
);
1670
my $chr = ( (exists $es{$cntrl})
1671
? $es{$cntrl}
hashmap.c
+1
-1
@@ -51,7 +51,7 @@ unsigned int memihash(const void *buf, size_t len)
51
}
52
53
/*
54
- * Incoporate another chunk of data into a memihash
54
+ * Incorporate another chunk of data into a memihash
55
* computation.
56
*/
57
unsigned int memihash_cont(unsigned int hash_seed, const void *buf, size_t len)
hashmap.h
+1
-1
@@ -502,7 +502,7 @@ static inline void hashmap_disable_item_counting(struct hashmap *map)
502
}
503
504
/*
505
- * Re-enable item couting when adding/removing items.
505
+ * Re-enable item counting when adding/removing items.
506
* If counting is currently disabled, it will force count them.
507
* It WILL NOT automatically rehash them.
508
*/
name-hash.c
+1
-1
@@ -138,7 +138,7 @@ static int lazy_nr_dir_threads;
138
139
/*
140
* Set a minimum number of cache_entries that we will handle per
141
- * thread and use that to decide how many threads to run (upto
141
+ * thread and use that to decide how many threads to run (up to
142
* the number on the system).
143
*
144
* For guidance setting the lower per-thread bound, see:
parse-options.c
+1
-1
@@ -623,7 +623,7 @@ static int show_gitcomp(const struct option *opts)
623
* Scan and may produce a new option[] array, which should be used
624
* instead of the original 'options'.
625
*
626
- * Right now this is only used to preprocess and substitue
626
+ * Right now this is only used to preprocess and substitute
627
* OPTION_ALIAS.
628
*/
629
static struct option *preprocess_options(struct parse_opt_ctx_t *ctx,
range-diff.h
+1
-1
@@ -6,7 +6,7 @@
6
#define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
7
8
/*
9
- * Compare series of commmits in RANGE1 and RANGE2, and emit to the
9
+ * Compare series of commits in RANGE1 and RANGE2, and emit to the
10
* standard output. NULL can be passed to DIFFOPT to use the built-in
11
* default.
12
*/
read-cache.c
+1
-1
@@ -1790,7 +1790,7 @@ static struct cache_entry *create_from_disk(struct mem_pool *ce_mem_pool,
1790
const unsigned char *cp = (const unsigned char *)name;
1791
size_t strip_len, previous_len;
1792
1793
- /* If we're at the begining of a block, ignore the previous name */
1793
+ /* If we're at the beginning of a block, ignore the previous name */
1794
strip_len = decode_varint(&cp);
1795
if (previous_ce) {
1796
previous_len = previous_ce->ce_namelen;
refs/refs-internal.h
+1
-1
@@ -262,7 +262,7 @@ int refs_rename_ref_available(struct ref_store *refs,
262
* after calling ref_iterator_advance() again or calling
263
* ref_iterator_abort(), you must make a copy. When the iteration has
264
* been exhausted, ref_iterator_advance() releases any resources
265
- * assocated with the iteration, frees the ref_iterator object, and
265
+ * associated with the iteration, frees the ref_iterator object, and
266
* returns ITER_DONE. If you want to abort the iteration early, call
267
* ref_iterator_abort(), which also frees the ref_iterator object and
268
* any associated resources. If there was an internal error advancing
repository.c
+2
-2
@@ -200,9 +200,9 @@ int repo_submodule_init(struct repository *subrepo,
200
201
if (repo_init(subrepo, gitdir.buf, worktree.buf)) {
202
/*
203
- * If initilization fails then it may be due to the submodule
203
+ * If initialization fails then it may be due to the submodule
204
* not being populated in the superproject's worktree. Instead
205
- * we can try to initilize the submodule by finding it's gitdir
205
+ * we can try to initialize the submodule by finding it's gitdir
206
* in the superproject's 'modules' directory. In this case the
207
* submodule would not have a worktree.
208
*/
repository.h
+1
-1
@@ -172,7 +172,7 @@ void repo_clear(struct repository *repo);
172
* be allocated if needed.
173
*
174
* Return the number of index entries in the populated index or a value less
175
- * than zero if an error occured. If the repository's index has already been
175
+ * than zero if an error occurred. If the repository's index has already been
176
* populated then the number of entries will simply be returned.
177
*/
178
int repo_read_index(struct repository *repo);
rerere.c
+1
-1
@@ -431,7 +431,7 @@ static int handle_conflict(struct strbuf *out, struct rerere_io *io,
431
* and NUL concatenated together.
432
*
433
* Return 1 if conflict hunks are found, 0 if there are no conflict
434
- * hunks and -1 if an error occured.
434
+ * hunks and -1 if an error occurred.
435
*/
436
static int handle_path(unsigned char *hash, struct rerere_io *io, int marker_size)
437
{
sequencer.c
+3
-3
@@ -131,7 +131,7 @@ static GIT_PATH_FUNC(rebase_path_rewritten_pending,
131
"rebase-merge/rewritten-pending")
132
133
/*
134
- * The path of the file containig the OID of the "squash onto" commit, i.e.
134
+ * The path of the file containing the OID of the "squash onto" commit, i.e.
135
* the dummy commit used for `reset [new root]`.
136
*/
137
static GIT_PATH_FUNC(rebase_path_squash_onto, "rebase-merge/squash-onto")
@@ -4644,7 +4644,7 @@ static int make_script_with_merges(struct pretty_print_context *pp,
4644
label_oid(oid, "branch-point", &state);
4645
}
4646
4647
- /* Add HEAD as implict "tip of branch" */
4647
+ /* Add HEAD as implicit "tip of branch" */
4648
if (!iter->next)
4649
tips_tail = &commit_list_insert(iter->item,
4650
tips_tail)->next;
@@ -4826,7 +4826,7 @@ void todo_list_add_exec_commands(struct todo_list *todo_list,
4826
* are considered part of the pick, so we insert the commands *after*
4827
* those chains if there are any.
4828
*
4829
- * As we insert the exec commands immediatly after rearranging
4829
+ * As we insert the exec commands immediately after rearranging
4830
* any fixups and before the user edits the list, a fixup chain
4831
* can never contain comments (any comments are empty picks that
4832
* have been commented out because the user did not specify
server-info.c
+1
-1
@@ -93,7 +93,7 @@ static int update_info_file(char *path,
93
uic.old_fp = fopen_or_warn(path, "r");
94
95
/*
96
- * uic_printf will compare incremental comparison aginst old_fp
96
+ * uic_printf will compare incremental comparison against old_fp
97
* and mark uic as stale if needed
98
*/
99
ret = generate(&uic);
string-list.h
+1
-1
@@ -179,7 +179,7 @@ void string_list_remove(struct string_list *list, const char *string,
179
180
/**
181
* Check if the given string is part of a sorted list. If it is part of the list,
182
- * return the coresponding string_list_item, NULL otherwise.
182
+ * return the corresponding string_list_item, NULL otherwise.
183
*/
184
struct string_list_item *string_list_lookup(struct string_list *list, const char *string);
185
trace2/tr2_sid.c
+1
-1
@@ -19,7 +19,7 @@ static int tr2sid_nr_git_parents;
19
* "H<first_8_chars_of_sha1_of_hostname>"
20
* "Localhost" when no hostname.
21
*
22
- * where <process> is a 9 character string containing the least signifcant
22
+ * where <process> is a 9 character string containing the least significant
23
* 32 bits in the process-id.
24
* "P<pid>"
25
* (This is an abribrary choice. On most systems pid_t is a 32 bit value,
unpack-trees.c
+2
-2
@@ -275,9 +275,9 @@ static int check_submodule_move_head(const struct cache_entry *ce,
275
}
276
277
/*
278
- * Preform the loading of the repository's gitmodules file. This function is
278
+ * Perform the loading of the repository's gitmodules file. This function is
279
* used by 'check_update()' to perform loading of the gitmodules file in two
280
- * differnt situations:
280
+ * different situations:
281
* (1) before removing entries from the working tree if the gitmodules file has
282
* been marked for removal. This situation is specified by 'state' == NULL.
283
* (2) before checking out entries to the working tree if the gitmodules file
url.c
+1
-1
@@ -5,7 +5,7 @@ int is_urlschemechar(int first_flag, int ch)
5
{
6
/*
7
* The set of valid URL schemes, as per STD66 (RFC3986) is
8
- * '[A-Za-z][A-Za-z0-9+.-]*'. But use sightly looser check
8
+ * '[A-Za-z][A-Za-z0-9+.-]*'. But use slightly looser check
9
* of '[A-Za-z0-9][A-Za-z0-9+.-]*' because earlier version
10
* of check used '[A-Za-z0-9]+' so not to break any remote
11
* helpers.
xdiff-interface.h
+1
-1
@@ -44,7 +44,7 @@ void discard_hunk_line(void *priv,
44
* Compare the strings l1 with l2 which are of size s1 and s2 respectively.
45
* Returns 1 if the strings are deemed equal, 0 otherwise.
46
* The `flags` given as XDF_WHITESPACE_FLAGS determine how white spaces
47
- * are treated for the comparision.
47
+ * are treated for the comparison.
48
*/
49
int xdiff_compare_lines(const char *l1, long s1,
50
const char *l2, long s2, long flags);