Fix spelling errors.
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
diff --git a/docs/error-handling.md b/docs/error-handling.md
index 04c855f..655afeb 100644
--- a/docs/error-handling.md
+++ b/docs/error-handling.md
@@ -29,7 +29,7 @@ The simple error API
- `void giterr_set(git_error **, int, const char *, ...)`: the main function used to set an error. It allocates a new error object and stores it in the passed error pointer. It has no return value. The arguments for `giterr_set` are as follows:
- `git_error **error_ptr`: the pointer where the error will be created.
- - `int error_class`: the class for the error. This is **not** an error code: this is an speficic enum that specifies the error family. The point is to map these families 1-1 with Exception types on higher level languages (e.g. GitRepositoryException)
+ - `int error_class`: the class for the error. This is **not** an error code: this is an specific enum that specifies the error family. The point is to map these families 1-1 with Exception types on higher level languages (e.g. GitRepositoryException)
- `const char *error_str, ...`: the error string, with optional formatting arguments
- `void giterr_free(git_error *)`: takes an error and frees it. This function is available in the external API.
@@ -56,7 +56,7 @@ Here are some guidelines when writing error messages:
- Use short, direct and objective messages. **One line, max**. libgit2 is a low level library: think that all the messages reported will be thrown as Ruby or Python exceptions. Think how long are common exception messages in those languages.
-- **Do not add redundant information to the error message**, specially information that can be infered from the context.
+- **Do not add redundant information to the error message**, specially information that can be inferred from the context.
E.g. in `git_repository_open`, do not report a message like "Failed to open repository: path not found". Somebody is
calling that function. If it fails, he already knows that the repository failed to open!
diff --git a/include/git2/attr.h b/include/git2/attr.h
index 28ca3bc..8f5a126 100644
--- a/include/git2/attr.h
+++ b/include/git2/attr.h
@@ -66,7 +66,7 @@ GIT_BEGIN_DECL
/**
* GIT_ATTR_HAS_VALUE checks if an attribute is set to a value (as
- * opposied to TRUE, FALSE or UNSPECIFIED). This would be the case if
+ * opposed to TRUE, FALSE or UNSPECIFIED). This would be the case if
* for a file with something like:
*
* *.txt eol=lf
diff --git a/include/git2/diff.h b/include/git2/diff.h
index bafe626..a0e8ad6 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -155,7 +155,7 @@ typedef int (*git_diff_hunk_fn)(
*
* These values describe where a line came from and will be passed to
* the git_diff_data_fn when iterating over a diff. There are some
- * special origin contants at the end that are used for the text
+ * special origin constants at the end that are used for the text
* output callbacks to demarcate lines that are actually part of
* the file or hunk headers.
*/
diff --git a/include/git2/index.h b/include/git2/index.h
index 6a42c85..0fb0f95 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -295,7 +295,7 @@ GIT_EXTERN(const git_index_entry_unmerged *) git_index_get_unmerged_byindex(git_
/**
* Return the stage number from a git index entry
*
- * This entry is calculated from the entrie's flag
+ * This entry is calculated from the entry's flag
* attribute like this:
*
* (entry->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 14bd0e4..6263777 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -28,7 +28,7 @@ typedef struct git_indexer_stream git_indexer_stream;
/**
* Create a new streaming indexer instance
*
- * @param out where to store the inexer instance
+ * @param out where to store the indexer instance
* @param path to the gitdir (metadata directory)
*/
GIT_EXTERN(int) git_indexer_stream_new(git_indexer_stream **out, const char *gitdir);
diff --git a/include/git2/object.h b/include/git2/object.h
index 9e988b7..4143251 100644
--- a/include/git2/object.h
+++ b/include/git2/object.h
@@ -21,7 +21,7 @@
GIT_BEGIN_DECL
/**
- * Lookup a reference to one of the objects in a repostory.
+ * Lookup a reference to one of the objects in a repository.
*
* The generated reference is owned by the repository and
* should be closed with the `git_object_free` method
@@ -45,7 +45,7 @@ GIT_EXTERN(int) git_object_lookup(
git_otype type);
/**
- * Lookup a reference to one of the objects in a repostory,
+ * Lookup a reference to one of the objects in a repository,
* given a prefix of its identifier (short id).
*
* The object obtained will be so that its identifier
@@ -114,7 +114,7 @@ GIT_EXTERN(git_repository *) git_object_owner(const git_object *obj);
* This method instructs the library to close an existing
* object; note that git_objects are owned and cached by the repository
* so the object may or may not be freed after this library call,
- * depending on how agressive is the caching mechanism used
+ * depending on how aggressive is the caching mechanism used
* by the repository.
*
* IMPORTANT:
diff --git a/include/git2/odb.h b/include/git2/odb.h
index 1df1933..e244317 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -62,7 +62,7 @@ GIT_EXTERN(int) git_odb_open(git_odb **out, const char *objects_dir);
* @param odb database to add the backend to
* @param backend pointer to a git_odb_backend instance
* @param priority Value for ordering the backends queue
- * @return 0 on sucess; error code otherwise
+ * @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_odb_add_backend(git_odb *odb, git_odb_backend *backend, int priority);
@@ -83,7 +83,7 @@ GIT_EXTERN(int) git_odb_add_backend(git_odb *odb, git_odb_backend *backend, int
* @param odb database to add the backend to
* @param backend pointer to a git_odb_backend instance
* @param priority Value for ordering the backends queue
- * @return 0 on sucess; error code otherwise
+ * @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_odb_add_alternate(git_odb *odb, git_odb_backend *backend, int priority);
@@ -185,7 +185,7 @@ GIT_EXTERN(int) git_odb_exists(git_odb *db, const git_oid *id);
*
* @param oid pointer to store the OID result of the write
* @param odb object database where to store the object
- * @param data buffer with the data to storr
+ * @param data buffer with the data to store
* @param len size of the buffer
* @param type type of the data to store
* @return 0 or an error code
@@ -250,7 +250,7 @@ GIT_EXTERN(int) git_odb_open_rstream(git_odb_stream **stream, git_odb *db, const
/**
* Determine the object-ID (sha1 hash) of a data buffer
*
- * The resulting SHA-1 OID will the itentifier for the data
+ * The resulting SHA-1 OID will be the identifier for the data
* buffer as if the data buffer it were to written to the ODB.
*
* @param id the resulting object-ID.
diff --git a/include/git2/oid.h b/include/git2/oid.h
index c06458d..a05b40a 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -84,7 +84,7 @@ GIT_EXTERN(void) git_oid_fmt(char *str, const git_oid *oid);
* Format a git_oid into a loose-object path string.
*
* The resulting string is "aa/...", where "aa" is the first two
- * hex digitis of the oid and "..." is the remaining 38 digits.
+ * hex digits of the oid and "..." is the remaining 38 digits.
*
* @param str output hex string; must be pointing at the start of
* the hex sequence and have at least the number of bytes
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 882e327..2918215 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -124,7 +124,7 @@ GIT_EXTERN(const char *) git_reference_name(git_reference *ref);
/**
* Resolve a symbolic reference
*
- * Thie method iteratively peels a symbolic reference
+ * This method iteratively peels a symbolic reference
* until it resolves to a direct reference to an OID.
*
* The peeled reference is returned in the `resolved_ref`
@@ -293,7 +293,7 @@ GIT_EXTERN(int) git_reference_is_packed(git_reference *ref);
*
* Reference pointers may become outdated if the Git
* repository is accessed simultaneously by other clients
- * whilt the library is open.
+ * while the library is open.
*
* This method forces a reload of the reference from disk,
* to ensure that the provided information is still
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 865dfef..7a032db 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -37,7 +37,7 @@ GIT_BEGIN_DECL
* this when you have a URL instead of a remote's name.
*
* @param out pointer to the new remote object
- * @param repo the associtated repository
+ * @param repo the associated repository
* @param name the remote's name
* @param url the remote repository's URL
* @param fetch the fetch refspec to use for this remote
@@ -100,7 +100,7 @@ GIT_EXTERN(const git_refspec *) git_remote_fetchspec(git_remote *remote);
* Set the remote's push refspec
*
* @param remote the remote
- * @apram spec the new push refspec
+ * @param spec the new push refspec
* @return 0 or an error value
*/
GIT_EXTERN(int) git_remote_set_pushspec(git_remote *remote, const char *spec);
@@ -149,7 +149,7 @@ GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void
* filename will be NULL and the function will return success.
*
* @param remote the remote to download from
- * @param filename where to store the temproray filename
+ * @param filename where to store the temporary filename
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_download(git_remote *remote, git_off_t *bytes, git_indexer_stats *stats);
@@ -195,7 +195,7 @@ GIT_EXTERN(int) git_remote_update_tips(git_remote *remote, int (*cb)(const char
/**
* Return whether a string is a valid remote URL
*
- * @param tranport the url to check
+ * @param url the url to check
* @param 1 if the url is valid, 0 otherwise
*/
GIT_EXTERN(int) git_remote_valid_url(const char *url);
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 3949438..0b56a08 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -130,7 +130,7 @@ GIT_EXTERN(int) git_repository_head(git_reference **head_out, git_repository *re
* instead of a branch.
*
* @param repo Repo to test
- * @return 1 if HEAD is detached, 0 if i'ts not; error code if there
+ * @return 1 if HEAD is detached, 0 if it's not; error code if there
* was an error.
*/
GIT_EXTERN(int) git_repository_head_detached(git_repository *repo);
@@ -143,7 +143,7 @@ GIT_EXTERN(int) git_repository_head_detached(git_repository *repo);
*
* @param repo Repo to test
* @return 1 if the current branch is an orphan, 0 if it's not; error
- * code if therewas an error
+ * code if there was an error
*/
GIT_EXTERN(int) git_repository_head_orphan(git_repository *repo);
diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h
index aac6fb7..2e9dc42 100644
--- a/include/git2/revwalk.h
+++ b/include/git2/revwalk.h
@@ -104,7 +104,7 @@ GIT_EXTERN(int) git_revwalk_push(git_revwalk *walk, const git_oid *oid);
/**
* Push matching references
*
- * The OIDs pinted to by the references that match the given glob
+ * The OIDs pointed to by the references that match the given glob
* pattern will be pushed to the revision walker.
*
* A leading 'refs/' is implied it not present as well as a trailing
@@ -142,7 +142,7 @@ GIT_EXTERN(int) git_revwalk_hide(git_revwalk *walk, const git_oid *oid);
/**
* Hide matching references.
*
- * The OIDs pinted to by the references that match the given glob
+ * The OIDs pointed to by the references that match the given glob
* pattern and their ancestors will be hidden from the output on the
* revision walk.
*
@@ -169,7 +169,7 @@ GIT_EXTERN(int) git_revwalk_hide_head(git_revwalk *walk);
* The reference must point to a commit.
*
* @param walk the walker being used for the traversal
- * @param refname the referece to push
+ * @param refname the reference to push
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_push_ref(git_revwalk *walk, const char *refname);
@@ -180,7 +180,7 @@ GIT_EXTERN(int) git_revwalk_push_ref(git_revwalk *walk, const char *refname);
* The reference must point to a commit.
*
* @param walk the walker being used for the traversal
- * @param refname the referece to hide
+ * @param refname the reference to hide
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide_ref(git_revwalk *walk, const char *refname);
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index 9301682..f65911a 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -83,7 +83,7 @@ GIT_EXTERN(int) git_submodule_foreach(
/**
* Lookup submodule information by name or path.
*
- * Given either the submodule name or path (they are ususally the same),
+ * Given either the submodule name or path (they are usually the same),
* this returns a structure describing the submodule. If the submodule
* does not exist, this will return GIT_ENOTFOUND and set the submodule
* pointer to NULL.
diff --git a/include/git2/tag.h b/include/git2/tag.h
index 859c289..13dc145 100644
--- a/include/git2/tag.h
+++ b/include/git2/tag.h
@@ -181,7 +181,7 @@ GIT_EXTERN(int) git_tag_create(
* @param repo Repository where to store the tag
* @param buffer Raw tag data
* @param force Overwrite existing tags
- * @return 0 on sucess; error code otherwise
+ * @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_tag_create_frombuffer(
git_oid *oid,
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 777f8ff..8f62e75 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -178,7 +178,7 @@ GIT_EXTERN(int) git_tree_create_fromindex(git_oid *oid, git_index *index);
*
* @param builder_p Pointer where to store the tree builder
* @param source Source tree to initialize the builder (optional)
- * @return 0 on sucess; error code otherwise
+ * @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_treebuilder_create(git_treebuilder **builder_p, const git_tree *source);
@@ -302,7 +302,7 @@ enum git_treewalk_mode {
* data itself.
*
* If the callback returns a negative value, the passed entry
- * will be skiped on the traversal.
+ * will be skipped on the traversal.
*
* @param tree The tree to walk
* @param callback Function to call on each tree entry