Commit d50b3464b4cb134712985b408933f294bbcca825

Edward Thomson 2022-01-17T21:39:43

Merge pull request #6164 from rex4539/typos Fix typos

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
diff --git a/cmake/FindGSSAPI.cmake b/cmake/FindGSSAPI.cmake
index 0f5932a..a11d72a 100644
--- a/cmake/FindGSSAPI.cmake
+++ b/cmake/FindGSSAPI.cmake
@@ -5,7 +5,7 @@
 #  GSSAPI_ROOT_DIR - Set this variable to the root installation of GSSAPI
 #
 # Read-Only variables:
-#  GSSAPI_FLAVOR_MIT - set to TURE if MIT Kerberos has been found
+#  GSSAPI_FLAVOR_MIT - set to TRUE if MIT Kerberos has been found
 #  GSSAPI_FLAVOR_HEIMDAL - set to TRUE if Heimdal Kerberos has been found
 #  GSSAPI_FOUND - system has GSSAPI
 #  GSSAPI_INCLUDE_DIR - the GSSAPI include directory
diff --git a/docs/release.md b/docs/release.md
index 3200c44..87fccaa 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -80,4 +80,4 @@ and run it against our description file with the tip of `main` checked out.
 
     cm doc api.docurium
 
-It will start up a few proceses and write out the results as a new commit onto the `gh-pages` branch. That can be pushed to GitHub to update what will show up on our documentation reference site.
+It will start up a few processes and write out the results as a new commit onto the `gh-pages` branch. That can be pushed to GitHub to update what will show up on our documentation reference site.
diff --git a/examples/blame.c b/examples/blame.c
index 954c97b..77087a5 100644
--- a/examples/blame.c
+++ b/examples/blame.c
@@ -49,7 +49,7 @@ int lg2_blame(git_repository *repo, int argc, char *argv[])
 	if (o.F) blameopts.flags |= GIT_BLAME_FIRST_PARENT;
 
 	/**
-	 * The commit range comes in "commitish" form. Use the rev-parse API to
+	 * The commit range comes in "committish" form. Use the rev-parse API to
 	 * nail down the end points.
 	 */
 	if (o.commitspec) {
@@ -70,7 +70,7 @@ int lg2_blame(git_repository *repo, int argc, char *argv[])
 
 	/**
 	 * Get the raw data inside the blob for output. We use the
-	 * `commitish:path/to/file.txt` format to find it.
+	 * `committish:path/to/file.txt` format to find it.
 	 */
 	if (git_oid_is_zero(&blameopts.newest_commit))
 		strcpy(spec, "HEAD");
diff --git a/include/git2/attr.h b/include/git2/attr.h
index 157192c..04f3c7c 100644
--- a/include/git2/attr.h
+++ b/include/git2/attr.h
@@ -344,7 +344,7 @@ GIT_EXTERN(int) git_attr_cache_flush(
  * Add a macro definition.
  *
  * Macros will automatically be loaded from the top level `.gitattributes`
- * file of the repository (plus the build-in "binary" macro).  This
+ * file of the repository (plus the built-in "binary" macro).  This
  * function allows you to add others.  For example, to add the default
  * macro, you would call:
  *
diff --git a/include/git2/clone.h b/include/git2/clone.h
index c517ec3..3481f25 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -74,8 +74,8 @@ typedef int GIT_CALLBACK(git_remote_create_cb)(
 	void *payload);
 
 /**
- * The signature of a function matchin git_repository_init, with an
- * aditional void * as callback payload.
+ * The signature of a function matching git_repository_init, with an
+ * additional void * as callback payload.
  *
  * Callers of git_clone my provide a function matching this signature
  * to override the repository creation and customization process
diff --git a/include/git2/describe.h b/include/git2/describe.h
index e8afd68..aaccbcd 100644
--- a/include/git2/describe.h
+++ b/include/git2/describe.h
@@ -152,7 +152,7 @@ GIT_EXTERN(int) git_describe_commit(
  * Describe a commit
  *
  * Perform the describe operation on the current commit and the
- * worktree. After peforming describe on HEAD, a status is run and the
+ * worktree. After performing describe on HEAD, a status is run and the
  * description is considered to be dirty if there are.
  *
  * @param out pointer to store the result. You must free this once
diff --git a/include/git2/diff.h b/include/git2/diff.h
index c040cd1..a820a57 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -758,7 +758,7 @@ typedef struct {
 	uint16_t copy_threshold;
 
 	/**
-	 * Treshold below which similar files will be split into a delete/add pair.
+	 * Threshold below which similar files will be split into a delete/add pair.
 	 * This is equivalent to the last part of the -B option. Defaults to 60.
 	 */
 	uint16_t break_rewrite_threshold;
@@ -1317,7 +1317,7 @@ typedef enum {
 /**
  * Accumulate diff statistics for all patches.
  *
- * @param out Structure containg the diff statistics.
+ * @param out Structure containing the diff statistics.
  * @param diff A git_diff generated by one of the above functions.
  * @return 0 on success; non-zero on error
  */
diff --git a/include/git2/odb.h b/include/git2/odb.h
index 0691aa4..9eaf897 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -578,7 +578,7 @@ GIT_EXTERN(int) git_odb_get_backend(git_odb_backend **out, git_odb *odb, size_t 
 /**
  * Set the git commit-graph for the ODB.
  *
- * After a successfull call, the ownership of the cgraph parameter will be
+ * After a successful call, the ownership of the cgraph parameter will be
  * transferred to libgit2, and the caller should not free it.
  *
  * The commit-graph can also be unset by explicitly passing NULL as the cgraph
diff --git a/include/git2/reflog.h b/include/git2/reflog.h
index c949a28..ec365c1 100644
--- a/include/git2/reflog.h
+++ b/include/git2/reflog.h
@@ -31,7 +31,7 @@ GIT_BEGIN_DECL
  * git_reflog_free().
  *
  * @param out pointer to reflog
- * @param repo the repostiory
+ * @param repo the repository
  * @param name reference to look up
  * @return 0 or an error code
  */
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 3a0095b..06f8bb9 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -57,7 +57,7 @@ GIT_EXTERN(int) git_reference_name_to_id(
 /**
  * Lookup a reference by DWIMing its short name
  *
- * Apply the git precendence rules to the given shorthand to determine
+ * Apply the git precedence rules to the given shorthand to determine
  * which reference the user is referring to.
  *
  * @param out pointer in which to store the reference
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 8bd877b..fa37d0f 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -808,19 +808,19 @@ GIT_EXTERN(int) git_repository_set_head(
  * If the provided committish cannot be found in the repository, the HEAD
  * is unaltered and GIT_ENOTFOUND is returned.
  *
- * If the provided commitish cannot be peeled into a commit, the HEAD
+ * If the provided committish cannot be peeled into a commit, the HEAD
  * is unaltered and -1 is returned.
  *
  * Otherwise, the HEAD will eventually be detached and will directly point to
  * the peeled Commit.
  *
  * @param repo Repository pointer
- * @param commitish Object id of the Commit the HEAD should point to
+ * @param committish Object id of the Commit the HEAD should point to
  * @return 0 on success, or an error code
  */
 GIT_EXTERN(int) git_repository_set_head_detached(
 	git_repository *repo,
-	const git_oid *commitish);
+	const git_oid *committish);
 
 /**
  * Make the repository HEAD directly point to the Commit.
@@ -836,7 +836,7 @@ GIT_EXTERN(int) git_repository_set_head_detached(
  */
 GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
 	git_repository *repo,
-	const git_annotated_commit *commitish);
+	const git_annotated_commit *committish);
 
 /**
  * Detach the HEAD.
@@ -846,7 +846,7 @@ GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
  * If the HEAD is already detached and points to a Tag, the HEAD is
  * updated into making it point to the peeled Commit, and 0 is returned.
  *
- * If the HEAD is already detached and points to a non commitish, the HEAD is
+ * If the HEAD is already detached and points to a non committish, the HEAD is
  * unaltered, and -1 is returned.
  *
  * Otherwise, the HEAD will be detached and point to the peeled Commit.
diff --git a/include/git2/reset.h b/include/git2/reset.h
index 7a471bd..b2ee2ba 100644
--- a/include/git2/reset.h
+++ b/include/git2/reset.h
@@ -48,7 +48,7 @@ typedef enum {
  *
  * @param target Committish to which the Head should be moved to. This object
  * must belong to the given `repo` and can either be a git_commit or a
- * git_tag. When a git_tag is being passed, it should be dereferencable
+ * git_tag. When a git_tag is being passed, it should be dereferenceable
  * to a git_commit which oid will be used as the target of the branch.
  *
  * @param reset_type Kind of reset operation to perform.
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index c6eeb96..319a605 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -181,7 +181,7 @@ GIT_EXTERN(int) git_submodule_update_options_init(
  * @param submodule Submodule object
  * @param init If the submodule is not initialized, setting this flag to true
  *        will initialize the submodule before updating. Otherwise, this will
- *        return an error if attempting to update an uninitialzed repository.
+ *        return an error if attempting to update an uninitialized repository.
  *        but setting this to true forces them to be updated.
  * @param options configuration options for the update.  If NULL, the
  *        function works as though GIT_SUBMODULE_UPDATE_OPTIONS_INIT was passed.
diff --git a/include/git2/tree.h b/include/git2/tree.h
index db24bf6..0a33f0b 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -255,7 +255,7 @@ GIT_EXTERN(int) git_treebuilder_new(
 	git_treebuilder **out, git_repository *repo, const git_tree *source);
 
 /**
- * Clear all the entires in the builder
+ * Clear all the entries in the builder
  *
  * @param bld Builder to clear
  * @return 0 on success; error code otherwise
diff --git a/include/git2/types.h b/include/git2/types.h
index 34d8c99..d4b033d 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -236,7 +236,7 @@ typedef struct git_refspec git_refspec;
 
 /**
  * Git's idea of a remote repository. A remote can be anonymous (in
- * which case it does not have backing configuration entires).
+ * which case it does not have backing configuration entries).
  */
 typedef struct git_remote git_remote;
 
diff --git a/src/attr.c b/src/attr.c
index 409c30b..1623b1d 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -646,7 +646,7 @@ static int collect_attr_files(
 	if (error < 0)
 		goto cleanup;
 
-	/* in precendence order highest to lowest:
+	/* in precedence order highest to lowest:
 	 * - $GIT_DIR/info/attributes
 	 * - path components with .gitattributes
 	 * - config core.attributesfile
diff --git a/src/branch.c b/src/branch.c
index cf985f1..03892a4 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -707,7 +707,7 @@ int git_branch_set_upstream(git_reference *branch, const char *branch_name)
 	if (error < 0)
 		goto on_error;
 
-	/* Update the upsteam branch config with the new name */
+	/* Update the upstream branch config with the new name */
 	if (git_str_printf(&key, "branch.%s.remote", shortname) < 0)
 		goto on_error;
 
diff --git a/src/cc-compat.h b/src/cc-compat.h
index f701b2d..a0971e8 100644
--- a/src/cc-compat.h
+++ b/src/cc-compat.h
@@ -75,7 +75,7 @@
 #	define PRIdZ "zd"
 #endif
 
-/* Micosoft Visual C/C++ */
+/* Microsoft Visual C/C++ */
 #if defined(_MSC_VER)
 /* disable "deprecated function" warnings */
 #	pragma warning ( disable : 4996 )
diff --git a/src/checkout.c b/src/checkout.c
index 8c2f706..bc3048c 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -963,7 +963,7 @@ static int checkout_conflicts_load(checkout_data *data, git_iterator *workdir, g
 {
 	git_index *index;
 
-	/* Only write conficts from sources that have them: indexes. */
+	/* Only write conflicts from sources that have them: indexes. */
 	if ((index = git_iterator_index(data->target)) == NULL)
 		return 0;
 
diff --git a/src/config.h b/src/config.h
index 5dfc9da..01b84b1 100644
--- a/src/config.h
+++ b/src/config.h
@@ -96,7 +96,7 @@ int git_config_lookup_map_enum(git_configmap_t *type_out,
 /**
  * Unlock the backend with the highest priority
  *
- * Unlocking will allow other writers to updat the configuration
+ * Unlocking will allow other writers to update the configuration
  * file. Optionally, any changes performed since the lock will be
  * applied to the configuration.
  *
diff --git a/src/fs_path.c b/src/fs_path.c
index 957f389..c9f03a7 100644
--- a/src/fs_path.c
+++ b/src/fs_path.c
@@ -136,7 +136,7 @@ Exit:
 
 /*
  * Determine if the path is a Windows prefix and, if so, returns
- * its actual lentgh. If it is not a prefix, returns -1.
+ * its actual length. If it is not a prefix, returns -1.
  */
 static int win32_prefix_length(const char *path, int len)
 {
diff --git a/src/futils.h b/src/futils.h
index 1386dc4..f0d7ec3 100644
--- a/src/futils.h
+++ b/src/futils.h
@@ -231,10 +231,10 @@ typedef enum {
  * Copy a directory tree.
  *
  * This copies directories and files from one root to another.  You can
- * pass a combinationof GIT_CPDIR flags as defined above.
+ * pass a combination of GIT_CPDIR flags as defined above.
  *
  * If you pass the CHMOD flag, then the dirmode will be applied to all
- * directories that are created during the copy, overiding the natural
+ * directories that are created during the copy, overriding the natural
  * permissions.  If you do not pass the CHMOD flag, then the dirmode
  * will actually be copied from the source files and the `dirmode` arg
  * will be ignored.
diff --git a/src/hash/sha1/sha1dc/sha1.c b/src/hash/sha1/sha1dc/sha1.c
index 4d03c75..9298227 100644
--- a/src/hash/sha1/sha1dc/sha1.c
+++ b/src/hash/sha1/sha1dc/sha1.c
@@ -70,7 +70,7 @@
 /* Not under GCC-alike or glibc */
 #elif defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && defined(_LITTLE_ENDIAN)
 /*
- * *BSD and newlib (embeded linux, cygwin, etc).
+ * *BSD and newlib (embedded linux, cygwin, etc).
  * the defined(_BIG_ENDIAN) && defined(_LITTLE_ENDIAN) part prevents
  * this condition from matching with Solaris/sparc.
  * (Solaris defines only one endian macro)
diff --git a/src/index.c b/src/index.c
index a2d80bc..367fd9c 100644
--- a/src/index.c
+++ b/src/index.c
@@ -3499,7 +3499,7 @@ static int index_apply_to_wd_diff(git_index *index, int action, const git_strarr
 	}
 
 	/*
-	 * We do the matching ourselves intead of passing the list to
+	 * We do the matching ourselves instead of passing the list to
 	 * diff because we want to tell the callback which one
 	 * matched, which we do not know if we ask diff to filter for us.
 	 */
diff --git a/src/indexer.c b/src/indexer.c
index ff60b40..16db9ca 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -1123,7 +1123,7 @@ static int update_header_and_rehash(git_indexer *idx, git_indexer_progress *stat
 	git_hash_init(&idx->trailer);
 
 
-	/* Update the header to include the numer of local objects we injected */
+	/* Update the header to include the number of local objects we injected */
 	idx->hdr.hdr_entries = htonl(stats->total_objects + stats->local_objects);
 	if (write_at(idx, &idx->hdr, 0, sizeof(struct git_pack_header)) < 0)
 		return -1;
diff --git a/src/khash.h b/src/khash.h
index 7adccdb..c9b7f13 100644
--- a/src/khash.h
+++ b/src/khash.h
@@ -564,7 +564,7 @@ static kh_inline khint_t __ac_Wang_hash(khint_t key)
 		code;												\
 	} }
 
-/* More conenient interfaces */
+/* More convenient interfaces */
 
 /*! @function
   @abstract     Instantiate a hash set containing integer keys
diff --git a/src/merge.c b/src/merge.c
index ec7e5bf..c871630 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -3019,10 +3019,10 @@ static int merge_check_workdir(size_t *conflicts, git_repository *repo, git_inde
 	*conflicts = 0;
 
 	/* We need to have merged at least 1 file for the possibility to exist to
-	 * have conflicts with the workdir. Passing 0 as the pathspec count paramter
+	 * have conflicts with the workdir. Passing 0 as the pathspec count parameter
 	 * will consider all files in the working directory, that is, we may detect
 	 * a conflict if there were untracked files in the workdir prior to starting
-	 * the merge. This typically happens when cherry-picking a commmit whose
+	 * the merge. This typically happens when cherry-picking a commit whose
 	 * changes have already been applied.
 	 */
 	if (merged_paths->length == 0)
diff --git a/src/mwindow.c b/src/mwindow.c
index da2dae2..d06b7a8 100644
--- a/src/mwindow.c
+++ b/src/mwindow.c
@@ -473,7 +473,7 @@ int git_mwindow_file_register(git_mwindow_file *mwf)
 				git_mwindow_find_lru_file_locked(&lru_file) == 0) {
 			if ((error = git_vector_insert(&closed_files, lru_file)) < 0) {
 				/*
-				 * Exceeding the file limit seems preferrable to being open to
+				 * Exceeding the file limit seems preferable to being open to
 				 * data races that can end up corrupting the heap.
 				 */
 				break;
diff --git a/src/odb_pack.c b/src/odb_pack.c
index 5b75210..818cc61 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -115,7 +115,7 @@ struct pack_writepack {
  *     | OID can be found. If we can find the offset to that SHA1 inside of the
  *     | index, that means the object is contained inside of the packfile and
  *     | we can stop searching. Before returning, we verify that the
- *     | packfile behing the index we are searching still exists on disk.
+ *     | packfile behind the index we are searching still exists on disk.
  *     |
  *     |-# pack_entry_find_offset
  *       | Mmap the actual index file to disk if it hasn't been opened
diff --git a/src/patch_parse.c b/src/patch_parse.c
index 37822fc..78cd962 100644
--- a/src/patch_parse.c
+++ b/src/patch_parse.c
@@ -353,7 +353,7 @@ static int parse_header_start(git_patch_parsed *patch, git_patch_parse_ctx *ctx)
 	 * We cannot expect to be able to always parse paths correctly at this
 	 * point. Due to the possibility of unquoted names, whitespaces in
 	 * filenames and custom prefixes we have to allow that, though, and just
-	 * proceeed here. We then hope for the "---" and "+++" lines to fix that
+	 * proceed here. We then hope for the "---" and "+++" lines to fix that
 	 * for us.
 	 */
 	if (!git_parse_ctx_contains(&ctx->parse_ctx, "\n", 1) &&
diff --git a/src/regexp.c b/src/regexp.c
index c1b9ef4..2569dea 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -45,7 +45,7 @@ int git_regexp_search(const git_regexp *r, const char *string, size_t nmatches, 
 	int error;
 	size_t i;
 
-	/* The ovec array always needs to be a mutiple of three */
+	/* The ovec array always needs to be a multiple of three */
 	if (nmatches <= ARRAY_SIZE(static_ovec) / 3)
 		ovec = static_ovec;
 	else
diff --git a/src/repository.c b/src/repository.c
index 8059f10..80b4a98 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -3027,19 +3027,19 @@ cleanup:
 
 int git_repository_set_head_detached(
 	git_repository *repo,
-	const git_oid *commitish)
+	const git_oid *committish)
 {
-	return detach(repo, commitish, NULL);
+	return detach(repo, committish, NULL);
 }
 
 int git_repository_set_head_detached_from_annotated(
 	git_repository *repo,
-	const git_annotated_commit *commitish)
+	const git_annotated_commit *committish)
 {
 	GIT_ASSERT_ARG(repo);
-	GIT_ASSERT_ARG(commitish);
+	GIT_ASSERT_ARG(committish);
 
-	return detach(repo, git_annotated_commit_id(commitish), commitish->description);
+	return detach(repo, git_annotated_commit_id(committish), committish->description);
 }
 
 int git_repository_detach_head(git_repository *repo)
diff --git a/src/revwalk.c b/src/revwalk.c
index e29e9c9..553e049 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -427,7 +427,7 @@ static int add_parents_to_list(git_revwalk *walk, git_commit_list_node *commit, 
 	return 0;
 }
 
-/* How many unintersting commits we want to look at after we run out of interesting ones */
+/* How many uninteresting commits we want to look at after we run out of interesting ones */
 #define SLOP 5
 
 static int still_interesting(git_commit_list *list, int64_t time, int slop)
diff --git a/src/status.c b/src/status.c
index b321e0e..df0f745 100644
--- a/src/status.c
+++ b/src/status.c
@@ -84,7 +84,7 @@ static unsigned int workdir_delta2status(
 
 		if (!git_oid_equal(&idx2wd->old_file.id, &idx2wd->new_file.id)) {
 			/* if OIDs don't match, we might need to calculate them now to
-			 * discern between RENAMED vs RENAMED+MODIFED
+			 * discern between RENAMED vs RENAMED+MODIFIED
 			 */
 			if (git_oid_is_zero(&idx2wd->old_file.id) &&
 				diff->old_src == GIT_ITERATOR_WORKDIR &&
diff --git a/src/streams/openssl_dynamic.h b/src/streams/openssl_dynamic.h
index 12d927a..a996919 100644
--- a/src/streams/openssl_dynamic.h
+++ b/src/streams/openssl_dynamic.h
@@ -13,7 +13,7 @@
  * The implementation was written so as to conform with Netscapes SSL.
  *
  * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to.  The following conditions
+ * the following conditions are adhered to.  The following conditions
  * apply to all code found in this distribution, be it the RC4, RSA,
  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
  * included with this distribution is covered by the same copyright terms
@@ -38,7 +38,7 @@
  *    must display the following acknowledgement:
  *    "This product includes cryptographic software written by
  *     Eric Young (eay@cryptsoft.com)"
- *    The word 'cryptographic' can be left out if the rouines from the library
+ *    The word 'cryptographic' can be left out if the routines from the library
  *    being used are not cryptographic related :-).
  * 4. If you include any Windows specific code (or a derivative thereof) from
  *    the apps directory (application code) you must include an acknowledgement:
@@ -56,7 +56,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * The licence and distribution terms for any publically available version or
+ * The licence and distribution terms for any publicly available version or
  * derivative of this code cannot be changed.  i.e. this code cannot simply be
  * copied and put under another distribution licence
  * [including the GNU Public Licence.]
diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c
index f1f1117..69edb4a 100644
--- a/src/transports/smart_protocol.c
+++ b/src/transports/smart_protocol.c
@@ -137,7 +137,7 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps, git_vec
 {
 	const char *ptr;
 
-	/* No refs or capabilites, odd but not a problem */
+	/* No refs or capabilities, odd but not a problem */
 	if (pkt == NULL || pkt->capabilities == NULL)
 		return GIT_ENOTFOUND;
 
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index f37bf70..a6f2e39 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -876,7 +876,7 @@ static int list_auth_methods(int *out, LIBSSH2_SESSION *session, const char *use
 			continue;
 		}
 
-		/* Skipt it if we don't know it */
+		/* Skip it if we don't know it */
 		ptr = strchr(ptr, ',');
 	}
 
diff --git a/src/tree.c b/src/tree.c
index 7290e15..a1545dc 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -605,7 +605,7 @@ static int write_tree(
 
 	/*
 	 * This loop is unfortunate, but necessary. The index doesn't have
-	 * any directores, so we need to handle that manually, and we
+	 * any directories, so we need to handle that manually, and we
 	 * need to keep track of the current position.
 	 */
 	for (i = start; i < entries; ++i) {
diff --git a/src/win32/path_w32.c b/src/win32/path_w32.c
index 5d7ad11..0e6aff7 100644
--- a/src/win32/path_w32.c
+++ b/src/win32/path_w32.c
@@ -41,7 +41,7 @@ GIT_INLINE(int) path__cwd(wchar_t *path, int size)
 	}
 
 	/* The Win32 APIs may return "\\?\" once you've used it first.
-	 * But it may not.  What a gloriously predictible API!
+	 * But it may not.  What a gloriously predictable API!
 	 */
 	if (wcsncmp(path, PATH__NT_NAMESPACE, PATH__NT_NAMESPACE_LEN))
 		return len;
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
index ba46b5e..b607241 100644
--- a/src/win32/posix_w32.c
+++ b/src/win32/posix_w32.c
@@ -441,7 +441,7 @@ int p_symlink(const char *target, const char *path)
 	 * not want to use `git_win32_path_from_utf8` for converting the target,
 	 * as that function will automatically pre-pend the current working
 	 * directory in case the path is not absolute. As Git will instead use
-	 * relative symlinks, this is not someting we want.
+	 * relative symlinks, this is not something we want.
 	 */
 	if (git_win32_path_from_utf8(path_w, path) < 0 ||
 	    git_win32_path_relative_from_utf8(target_w, target) < 0)
diff --git a/src/win32/w32_leakcheck.c b/src/win32/w32_leakcheck.c
index 5c8425b..0f095de 100644
--- a/src/win32/w32_leakcheck.c
+++ b/src/win32/w32_leakcheck.c
@@ -199,7 +199,7 @@ int git_win32_leakcheck_stack(
 	return 0;
 }
 
-/* Strack tracing */
+/* Stack tracing */
 
 #define STACKTRACE_UID_LEN (15)
 
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index fdf194d..f293c15 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -2,7 +2,7 @@ set(Python_ADDITIONAL_VERSIONS 3 2.7)
 find_package(PythonInterp)
 
 if(NOT PYTHONINTERP_FOUND)
-	message(FATAL_ERROR "Could not find a python interpeter, which is needed to build the tests. "
+	message(FATAL_ERROR "Could not find a python interpreter, which is needed to build the tests. "
 	                     "Make sure python is available, or pass -DBUILD_TESTS=OFF to skip building the tests")
 ENDIF()
 
diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c
index de7dd7d..d4b57f5 100644
--- a/tests/checkout/tree.c
+++ b/tests/checkout/tree.c
@@ -66,7 +66,7 @@ void test_checkout_tree__can_checkout_and_remove_directory(void)
 {
 	cl_assert_equal_i(false, git_fs_path_isdir("./testrepo/ab/"));
 
-	/* Checkout brach "subtrees" and update HEAD, so that HEAD matches the
+	/* Checkout branch "subtrees" and update HEAD, so that HEAD matches the
 	 * current working tree
 	 */
 	cl_git_pass(git_revparse_single(&g_object, g_repo, "subtrees"));
@@ -81,7 +81,7 @@ void test_checkout_tree__can_checkout_and_remove_directory(void)
 	git_object_free(g_object);
 	g_object = NULL;
 
-	/* Checkout brach "master" and update HEAD, so that HEAD matches the
+	/* Checkout branch "master" and update HEAD, so that HEAD matches the
 	 * current working tree
 	 */
 	cl_git_pass(git_revparse_single(&g_object, g_repo, "master"));
@@ -537,7 +537,7 @@ static void assert_conflict(
 	g_opts.checkout_strategy = GIT_CHECKOUT_FORCE;
 	cl_git_pass(git_checkout_tree(g_repo, g_object, &g_opts));
 
-	/* Hack-ishy workaound to ensure *all* the index entries
+	/* Hack-ishy workaround to ensure *all* the index entries
 	 * match the content of the tree
 	 */
 	cl_git_pass(git_object_peel(&hack_tree, g_object, GIT_OBJECT_TREE));
diff --git a/tests/clar_libgit2_timer.h b/tests/clar_libgit2_timer.h
index 0d150e0..7571a52 100644
--- a/tests/clar_libgit2_timer.h
+++ b/tests/clar_libgit2_timer.h
@@ -3,7 +3,7 @@
 
 struct cl_perf_timer
 {
-	/* cummulative running time across all start..stop intervals */
+	/* cumulative running time across all start..stop intervals */
 	double sum;
 
 	/* value of last start..stop interval */
@@ -27,7 +27,7 @@ void cl_perf_timer__stop(cl_perf_timer *t);
 double cl_perf_timer__last(const cl_perf_timer *t);
 
 /**
- * return cummulative running time across all start..stop
+ * return cumulative running time across all start..stop
  * intervals in seconds.
  */
 double cl_perf_timer__sum(const cl_perf_timer *t);
diff --git a/tests/commit/write.c b/tests/commit/write.c
index 2c22785..5a9c9d5 100644
--- a/tests/commit/write.c
+++ b/tests/commit/write.c
@@ -155,7 +155,7 @@ void test_commit_write__root(void)
 	cl_git_pass(git_signature_new(&committer, committer_name, committer_email, 123456789, 60));
 	cl_git_pass(git_signature_new(&author, committer_name, committer_email, 987654321, 90));
 
-	/* First we need to update HEAD so it points to our non-existant branch */
+	/* First we need to update HEAD so it points to our non-existent branch */
 	cl_git_pass(git_reference_lookup(&head, g_repo, "HEAD"));
 	cl_assert(git_reference_type(head) == GIT_REFERENCE_SYMBOLIC);
 	head_old = git__strdup(git_reference_symbolic_target(head));
diff --git a/tests/config/multivar.c b/tests/config/multivar.c
index 4f08a48..244e375 100644
--- a/tests/config/multivar.c
+++ b/tests/config/multivar.c
@@ -128,7 +128,7 @@ void test_config_multivar__add(void)
 	int n;
 
 	cl_git_pass(git_config_open_ondisk(&cfg, "config/config11"));
-	cl_git_pass(git_config_set_multivar(cfg, _name, "nonexistant", "git://git.otherplace.org/libgit2"));
+	cl_git_pass(git_config_set_multivar(cfg, _name, "non-existent", "git://git.otherplace.org/libgit2"));
 
 	n = 0;
 	cl_git_pass(git_config_get_multivar_foreach(cfg, _name, NULL, cb, &n));
diff --git a/tests/core/rmdir.c b/tests/core/rmdir.c
index 8e5bd58..f6c66b3 100644
--- a/tests/core/rmdir.c
+++ b/tests/core/rmdir.c
@@ -33,7 +33,7 @@ void test_core_rmdir__cleanup(void)
 		cl_git_pass(git_futils_rmdir_r(empty_tmp_dir, NULL, GIT_RMDIR_REMOVE_FILES));
 }
 
-/* make sure empty dir can be deleted recusively */
+/* make sure empty dir can be deleted recursively */
 void test_core_rmdir__delete_recursive(void)
 {
 	git_str path = GIT_STR_INIT;
@@ -47,7 +47,7 @@ void test_core_rmdir__delete_recursive(void)
 	git_str_dispose(&path);
 }
 
-/* make sure non-empty dir cannot be deleted recusively */
+/* make sure non-empty dir cannot be deleted recursively */
 void test_core_rmdir__fail_to_delete_non_empty_dir(void)
 {
 	git_str file = GIT_STR_INIT;
diff --git a/tests/core/structinit.c b/tests/core/structinit.c
index d24da87..160e2f6 100644
--- a/tests/core/structinit.c
+++ b/tests/core/structinit.c
@@ -67,7 +67,7 @@ void test_core_structinit__compare(void)
 	 * which is not guaranteed to be initialized to anything sane at all.
 	 *
 	 * Assume most compilers, in a debug build, will clear that memory for
-	 * us or set it to sentinal markers.  Etc.
+	 * us or set it to sentinel markers.  Etc.
 	 */
 #if !defined(DEBUG) && !defined(_DEBUG)
 	clar__skip();
diff --git a/tests/diff/rename.c b/tests/diff/rename.c
index 41dc95e..30e9ea4 100644
--- a/tests/diff/rename.c
+++ b/tests/diff/rename.c
@@ -375,7 +375,7 @@ void test_diff_rename__not_exact_match(void)
 	/* git diff -M -C --find-copies-harder --break-rewrites \
 	 *          1c068dee5790ef1580cfc4cd670915b48d790084 \
 	 *          19dd32dfb1520a64e5bbaae8dce6ef423dfa2f13
-	 * with ignore_space whitespace comparision
+	 * with ignore_space whitespace comparison
 	 */
 	cl_git_pass(git_diff_tree_to_tree(
 		&diff, g_repo, old_tree, new_tree, &diffopts));
diff --git a/tests/index/tests.c b/tests/index/tests.c
index b671557..205d12e 100644
--- a/tests/index/tests.c
+++ b/tests/index/tests.c
@@ -200,14 +200,14 @@ void test_index_tests__write(void)
 
 void test_index_tests__sort0(void)
 {
-	/* sort the entires in an index */
+	/* sort the entries in an index */
 
    /*
    * TODO: This no longer applies:
    * index sorting in Git uses some specific changes to the way
    * directories are sorted.
    *
-   * We need to specificially check for this by creating a new
+   * We need to specifically check for this by creating a new
    * index, adding entries in random order and then
    * checking for consistency
    */
@@ -215,7 +215,7 @@ void test_index_tests__sort0(void)
 
 void test_index_tests__sort1(void)
 {
-   /* sort the entires in an empty index */
+   /* sort the entries in an empty index */
    git_index *index;
 
    cl_git_pass(git_index_open(&index, "fake-index"));
@@ -242,7 +242,7 @@ void test_index_tests__add(void)
 
 	cl_set_cleanup(&cleanup_myrepo, NULL);
 
-	/* Intialize a new repository */
+	/* Initialize a new repository */
 	cl_git_pass(git_repository_init(&repo, "./myrepo", 0));
 
 	/* Ensure we're the only guy in the room */
@@ -293,7 +293,7 @@ void test_index_tests__add_frombuffer(void)
 
 	cl_set_cleanup(&cleanup_myrepo, NULL);
 
-	/* Intialize a new repository */
+	/* Initialize a new repository */
 	cl_git_pass(git_repository_init(&repo, "./myrepo", 0));
 
 	/* Ensure we're the only guy in the room */
@@ -435,7 +435,7 @@ void test_index_tests__add_frombuffer_reset_entry(void)
 
 	cl_set_cleanup(&cleanup_myrepo, NULL);
 
-	/* Intialize a new repository */
+	/* Initialize a new repository */
 	cl_git_pass(git_repository_init(&repo, "./myrepo", 0));
 	cl_git_pass(git_repository_index(&index, repo));
 	cl_git_pass(git_futils_mkpath2file("myrepo/test.txt", 0777));
diff --git a/tests/network/url/parse.c b/tests/network/url/parse.c
index edfd6ab..8149ba5 100644
--- a/tests/network/url/parse.c
+++ b/tests/network/url/parse.c
@@ -552,6 +552,6 @@ void test_network_url_parse__ipv6_invalid_addresses(void)
 	cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
 		"https://user:pass@fe80::dcad:beff:fe00:0001:9191/resource"));
 
-	/* Invalid chracter inside address */
+	/* Invalid character inside address */
 	cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata, "http://[fe8o::dcad:beff:fe00:0001]/resource"));
 }
diff --git a/tests/object/raw/convert.c b/tests/object/raw/convert.c
index 88b1380..40a01ae 100644
--- a/tests/object/raw/convert.c
+++ b/tests/object/raw/convert.c
@@ -38,7 +38,7 @@ void test_object_raw_convert__succeed_on_oid_to_string_conversion(void)
 		cl_assert(*(str+i) == '\0');
 		/* must not touch bytes past end of string */
 		cl_assert(*(str+(i+1)) == 'Z');
-		/* i == n-1 charaters of string */
+		/* i == n-1 characters of string */
 		cl_git_pass(strncmp(exp, out, i));
 	}
 
diff --git a/tests/object/tree/read.c b/tests/object/tree/read.c
index de2e64c..95a2e70 100644
--- a/tests/object/tree/read.c
+++ b/tests/object/tree/read.c
@@ -21,7 +21,7 @@ void test_object_tree_read__cleanup(void)
 
 void test_object_tree_read__loaded(void)
 {
-	/* acces randomly the entries on a loaded tree */
+	/* access randomly the entries on a loaded tree */
 	git_oid id;
 	git_tree *tree;
 
diff --git a/tests/path/core.c b/tests/path/core.c
index 9421941..db5359a 100644
--- a/tests/path/core.c
+++ b/tests/path/core.c
@@ -290,7 +290,7 @@ void test_path_core__validate_workdir(void)
 
 #ifdef GIT_WIN32
 	/*
-	 * In the absense of a repo configuration, 259 character paths
+	 * In the absence of a repo configuration, 259 character paths
 	 * succeed. >= 260 character paths fail.
 	 */
 	cl_must_pass(git_path_validate_length(NULL, "C:\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\aaaaaaaaa\\ok.txt"));
diff --git a/tests/path/win32.c b/tests/path/win32.c
index 64d8d8e..1aaf686 100644
--- a/tests/path/win32.c
+++ b/tests/path/win32.c
@@ -269,7 +269,7 @@ void test_path_win32__8dot3_name(void)
 	cl_assert_equal_s("WINDOWS", (shortname = git_win32_path_8dot3_name("C:\\WINDOWS")));
 	git__free(shortname);
 
-	/* Create some predictible short names */
+	/* Create some predictable short names */
 	cl_must_pass(p_mkdir(".foo", 0777));
 	cl_assert_equal_s("FOO~1", (shortname = git_win32_path_8dot3_name(".foo")));
 	git__free(shortname);
diff --git a/tests/refs/branches/delete.c b/tests/refs/branches/delete.c
index 077882b..27995f9 100644
--- a/tests/refs/branches/delete.c
+++ b/tests/refs/branches/delete.c
@@ -136,7 +136,7 @@ void test_refs_branches_delete__removes_reflog(void)
 
 	cl_assert_equal_i(false, git_reference_has_log(repo, "refs/heads/track-local"));
 
-	/* Reading a nonexistant reflog creates it, but it should be empty */
+	/* Reading a non-existent reflog creates it, but it should be empty */
 	cl_git_pass(git_reflog_read(&log, repo, "refs/heads/track-local"));
 	cl_assert_equal_i(0, git_reflog_entrycount(log));
 	git_reflog_free(log);
diff --git a/tests/submodule/update.c b/tests/submodule/update.c
index 79353e5..4aa9598 100644
--- a/tests/submodule/update.c
+++ b/tests/submodule/update.c
@@ -11,7 +11,7 @@ void test_submodule_update__cleanup(void)
 	cl_git_sandbox_cleanup();
 }
 
-void test_submodule_update__unitialized_submodule_no_init(void)
+void test_submodule_update__uninitialized_submodule_no_init(void)
 {
 	git_submodule *sm;
 	git_submodule_update_options update_options = GIT_SUBMODULE_UPDATE_OPTIONS_INIT;
@@ -21,7 +21,7 @@ void test_submodule_update__unitialized_submodule_no_init(void)
 	/* get the submodule */
 	cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
 
-	/* updating an unitialized repository throws */
+	/* updating an uninitialized repository throws */
 	cl_git_fail_with(
 		GIT_ERROR,
 		git_submodule_update(sm, 0, &update_options));