diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-09-19 03:34:49 +0300 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-09-19 03:34:49 +0300 |
commit | 87d9869fc30951cec632e0d6a3d1dd47756d2886 (patch) | |
tree | ad39ac1e487e2d5baa64d7fa979122541f6b8bcb /include/git2 | |
parent | bb742ede3d54564ff900fb7246e7b1ff01482b2c (diff) | |
download | libgit2-87d9869fc30951cec632e0d6a3d1dd47756d2886.tar.gz |
Tabify everything
There were quite a few places were spaces were being used instead of
tabs. Try to catch them all. This should hopefully not break anything.
Except for `git blame`. Oh well.
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/commit.h | 10 | ||||
-rw-r--r-- | include/git2/common.h | 22 | ||||
-rw-r--r-- | include/git2/errors.h | 4 | ||||
-rw-r--r-- | include/git2/index.h | 30 | ||||
-rw-r--r-- | include/git2/odb.h | 6 | ||||
-rw-r--r-- | include/git2/oid.h | 26 | ||||
-rw-r--r-- | include/git2/revwalk.h | 10 | ||||
-rw-r--r-- | include/git2/status.h | 14 | ||||
-rw-r--r-- | include/git2/tag.h | 4 | ||||
-rw-r--r-- | include/git2/thread-utils.h | 58 | ||||
-rw-r--r-- | include/git2/types.h | 22 |
11 files changed, 103 insertions, 103 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h index 2e94a6497..3c90e8007 100644 --- a/include/git2/commit.h +++ b/include/git2/commit.h @@ -26,8 +26,8 @@ GIT_BEGIN_DECL * * @param commit pointer to the looked up commit * @param repo the repo to use when locating the commit. - * @param id identity of the commit to locate. If the object is - * an annotated tag it will be peeled back to the commit. + * @param id identity of the commit to locate. If the object is + * an annotated tag it will be peeled back to the commit. * @return GIT_SUCCESS or an error code */ GIT_INLINE(int) git_commit_lookup(git_commit **commit, git_repository *repo, const git_oid *id) @@ -43,8 +43,8 @@ GIT_INLINE(int) git_commit_lookup(git_commit **commit, git_repository *repo, con * * @param commit pointer to the looked up commit * @param repo the repo to use when locating the commit. - * @param id identity of the commit to locate. If the object is - * an annotated tag it will be peeled back to the commit. + * @param id identity of the commit to locate. If the object is + * an annotated tag it will be peeled back to the commit. * @param len the length of the short identifier * @return GIT_SUCCESS or an error code */ @@ -197,7 +197,7 @@ GIT_EXTERN(const git_oid *) git_commit_parent_oid(git_commit *commit, unsigned i * time of this commit * * @param committer Signature representing the committer and the - * commit time of this commit + * commit time of this commit * * @param message_encoding The encoding for the message in the * commit, represented with a standard encoding name. diff --git a/include/git2/common.h b/include/git2/common.h index f14314054..1a595b058 100644 --- a/include/git2/common.h +++ b/include/git2/common.h @@ -12,20 +12,20 @@ #include <stdlib.h> #ifdef __cplusplus -# define GIT_BEGIN_DECL extern "C" { -# define GIT_END_DECL } +# define GIT_BEGIN_DECL extern "C" { +# define GIT_END_DECL } #else - /** Start declarations in C mode */ -# define GIT_BEGIN_DECL /* empty */ - /** End declarations in C mode */ -# define GIT_END_DECL /* empty */ + /** Start declarations in C mode */ +# define GIT_BEGIN_DECL /* empty */ + /** End declarations in C mode */ +# define GIT_END_DECL /* empty */ #endif /** Declare a public function exported for application use. */ #ifdef __GNUC__ # define GIT_EXTERN(type) extern \ - __attribute__((visibility("default"))) \ - type + __attribute__((visibility("default"))) \ + type #elif defined(_MSC_VER) # define GIT_EXTERN(type) __declspec(dllexport) type #else @@ -35,9 +35,9 @@ /** Declare a public TLS symbol exported for application use. */ #ifdef __GNUC__ # define GIT_EXTERN_TLS(type) extern \ - __attribute__((visibility("default"))) \ - GIT_TLS \ - type + __attribute__((visibility("default"))) \ + GIT_TLS \ + type #elif defined(_MSC_VER) # define GIT_EXTERN_TLS(type) __declspec(dllexport) GIT_TLS type #else diff --git a/include/git2/errors.h b/include/git2/errors.h index 8b9fe3b07..5ac0d5b27 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -64,7 +64,7 @@ typedef enum { GIT_EINVALIDREFNAME = -15, /** The specified reference has its data corrupted */ - GIT_EREFCORRUPTED = -16, + GIT_EREFCORRUPTED = -16, /** The specified symbolic reference is too deeply nested */ GIT_ETOONESTEDSYMREF = -17, @@ -111,7 +111,7 @@ typedef enum { /** The path pattern and string did not match */ GIT_ENOMATCH = -31, - /** The buffer is too short to satisfy the request */ + /** The buffer is too short to satisfy the request */ GIT_ESHORTBUFFER = -32, } git_error; diff --git a/include/git2/index.h b/include/git2/index.h index 70d928b8e..5e9c34d4b 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -20,10 +20,10 @@ */ GIT_BEGIN_DECL -#define GIT_IDXENTRY_NAMEMASK (0x0fff) +#define GIT_IDXENTRY_NAMEMASK (0x0fff) #define GIT_IDXENTRY_STAGEMASK (0x3000) -#define GIT_IDXENTRY_EXTENDED (0x4000) -#define GIT_IDXENTRY_VALID (0x8000) +#define GIT_IDXENTRY_EXTENDED (0x4000) +#define GIT_IDXENTRY_VALID (0x8000) #define GIT_IDXENTRY_STAGESHIFT 12 /* @@ -33,26 +33,26 @@ GIT_BEGIN_DECL * * In-memory only flags: */ -#define GIT_IDXENTRY_UPDATE (1 << 0) -#define GIT_IDXENTRY_REMOVE (1 << 1) -#define GIT_IDXENTRY_UPTODATE (1 << 2) -#define GIT_IDXENTRY_ADDED (1 << 3) +#define GIT_IDXENTRY_UPDATE (1 << 0) +#define GIT_IDXENTRY_REMOVE (1 << 1) +#define GIT_IDXENTRY_UPTODATE (1 << 2) +#define GIT_IDXENTRY_ADDED (1 << 3) -#define GIT_IDXENTRY_HASHED (1 << 4) -#define GIT_IDXENTRY_UNHASHED (1 << 5) -#define GIT_IDXENTRY_WT_REMOVE (1 << 6) /* remove in work directory */ -#define GIT_IDXENTRY_CONFLICTED (1 << 7) +#define GIT_IDXENTRY_HASHED (1 << 4) +#define GIT_IDXENTRY_UNHASHED (1 << 5) +#define GIT_IDXENTRY_WT_REMOVE (1 << 6) /* remove in work directory */ +#define GIT_IDXENTRY_CONFLICTED (1 << 7) -#define GIT_IDXENTRY_UNPACKED (1 << 8) +#define GIT_IDXENTRY_UNPACKED (1 << 8) #define GIT_IDXENTRY_NEW_SKIP_WORKTREE (1 << 9) /* * Extended on-disk flags: */ -#define GIT_IDXENTRY_INTENT_TO_ADD (1 << 13) -#define GIT_IDXENTRY_SKIP_WORKTREE (1 << 14) +#define GIT_IDXENTRY_INTENT_TO_ADD (1 << 13) +#define GIT_IDXENTRY_SKIP_WORKTREE (1 << 14) /* GIT_IDXENTRY_EXTENDED2 is for future extension */ -#define GIT_IDXENTRY_EXTENDED2 (1 << 15) +#define GIT_IDXENTRY_EXTENDED2 (1 << 15) #define GIT_IDXENTRY_EXTENDED_FLAGS (GIT_IDXENTRY_INTENT_TO_ADD | GIT_IDXENTRY_SKIP_WORKTREE) diff --git a/include/git2/odb.h b/include/git2/odb.h index 0f719ae7f..27837418b 100644 --- a/include/git2/odb.h +++ b/include/git2/odb.h @@ -28,7 +28,7 @@ GIT_BEGIN_DECL * backend must be manually added using `git_odb_add_backend()` * * @param out location to store the database pointer, if opened. - * Set to NULL if the open failed. + * Set to NULL if the open failed. * @return GIT_SUCCESS or an error code */ GIT_EXTERN(int) git_odb_new(git_odb **out); @@ -45,7 +45,7 @@ GIT_EXTERN(int) git_odb_new(git_odb **out); * contains a 'pack/' folder with the corresponding data * * @param out location to store the database pointer, if opened. - * Set to NULL if the open failed. + * Set to NULL if the open failed. * @param objects_dir path of the backends' "objects" directory. * @return GIT_SUCCESS or an error code */ @@ -90,7 +90,7 @@ GIT_EXTERN(int) git_odb_add_alternate(git_odb *odb, git_odb_backend *backend, in /** * Close an open object database. * - * @param db database pointer to close. If NULL no action is taken. + * @param db database pointer to close. If NULL no action is taken. */ GIT_EXTERN(void) git_odb_close(git_odb *db); diff --git a/include/git2/oid.h b/include/git2/oid.h index 2dd9e4f51..f9636d1fc 100644 --- a/include/git2/oid.h +++ b/include/git2/oid.h @@ -41,8 +41,8 @@ struct _git_oid { * * @param out oid structure the result is written into. * @param str input hex string; must be pointing at the start of - * the hex sequence and have at least the number of bytes - * needed for an oid encoded in hex (40 bytes). + * the hex sequence and have at least the number of bytes + * needed for an oid encoded in hex (40 bytes). * @return GIT_SUCCESS or an error code */ GIT_EXTERN(int) git_oid_fromstr(git_oid *out, const char *str); @@ -72,10 +72,10 @@ GIT_EXTERN(void) git_oid_fromraw(git_oid *out, const unsigned char *raw); * Format a git_oid into a hex string. * * @param str output hex string; must be pointing at the start of - * the hex sequence and have at least the number of bytes - * needed for an oid encoded in hex (40 bytes). Only the - * oid digits are written; a '\\0' terminator must be added - * by the caller if it is required. + * the hex sequence and have at least the number of bytes + * needed for an oid encoded in hex (40 bytes). Only the + * oid digits are written; a '\\0' terminator must be added + * by the caller if it is required. * @param oid oid structure to format. */ GIT_EXTERN(void) git_oid_fmt(char *str, const git_oid *oid); @@ -87,10 +87,10 @@ GIT_EXTERN(void) git_oid_fmt(char *str, const git_oid *oid); * hex digitis 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 - * needed for an oid encoded in hex (41 bytes). Only the - * oid digits are written; a '\\0' terminator must be added - * by the caller if it is required. + * the hex sequence and have at least the number of bytes + * needed for an oid encoded in hex (41 bytes). Only the + * oid digits are written; a '\\0' terminator must be added + * by the caller if it is required. * @param oid oid structure to format. */ GIT_EXTERN(void) git_oid_pathfmt(char *str, const git_oid *oid); @@ -99,8 +99,8 @@ GIT_EXTERN(void) git_oid_pathfmt(char *str, const git_oid *oid); * Format a git_oid into a newly allocated c-string. * * @param oid the oid structure to format - * @return the c-string; NULL if memory is exhausted. Caller must - * deallocate the string with free(). + * @return the c-string; NULL if memory is exhausted. Caller must + * deallocate the string with free(). */ GIT_EXTERN(char *) git_oid_allocfmt(const git_oid *oid); @@ -117,7 +117,7 @@ GIT_EXTERN(char *) git_oid_allocfmt(const git_oid *oid); * @param n the size of the out buffer. * @param oid the oid structure to format. * @return the out buffer pointer, assuming no input parameter - * errors, otherwise a pointer to an empty string. + * errors, otherwise a pointer to an empty string. */ GIT_EXTERN(char *) git_oid_to_string(char *out, size_t n, const git_oid *oid); diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h index b232de83a..c84c5d301 100644 --- a/include/git2/revwalk.h +++ b/include/git2/revwalk.h @@ -26,28 +26,28 @@ GIT_BEGIN_DECL * and subject to change at any time. * This is the default sorting for new walkers. */ -#define GIT_SORT_NONE (0) +#define GIT_SORT_NONE (0) /** * Sort the repository contents in topological order * (parents before children); this sorting mode * can be combined with time sorting. */ -#define GIT_SORT_TOPOLOGICAL (1 << 0) +#define GIT_SORT_TOPOLOGICAL (1 << 0) /** * Sort the repository contents by commit time; * this sorting mode can be combined with * topological sorting. */ -#define GIT_SORT_TIME (1 << 1) +#define GIT_SORT_TIME (1 << 1) /** * Iterate through the repository contents in reverse * order; this sorting mode can be combined with * any of the above. */ -#define GIT_SORT_REVERSE (1 << 2) +#define GIT_SORT_REVERSE (1 << 2) /** * Allocate a new revision walker to iterate through a repo. @@ -151,7 +151,7 @@ GIT_EXTERN(void) git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode); /** * Free a revision walker previously allocated. * - * @param walk traversal handle to close. If NULL nothing occurs. + * @param walk traversal handle to close. If NULL nothing occurs. */ GIT_EXTERN(void) git_revwalk_free(git_revwalk *walk); diff --git a/include/git2/status.h b/include/git2/status.h index 5f498d882..42b2dd197 100644 --- a/include/git2/status.h +++ b/include/git2/status.h @@ -19,19 +19,19 @@ */ GIT_BEGIN_DECL -#define GIT_STATUS_CURRENT 0 +#define GIT_STATUS_CURRENT 0 /** Flags for index status */ -#define GIT_STATUS_INDEX_NEW (1 << 0) +#define GIT_STATUS_INDEX_NEW (1 << 0) #define GIT_STATUS_INDEX_MODIFIED (1 << 1) -#define GIT_STATUS_INDEX_DELETED (1 << 2) +#define GIT_STATUS_INDEX_DELETED (1 << 2) /** Flags for worktree status */ -#define GIT_STATUS_WT_NEW (1 << 3) -#define GIT_STATUS_WT_MODIFIED (1 << 4) -#define GIT_STATUS_WT_DELETED (1 << 5) +#define GIT_STATUS_WT_NEW (1 << 3) +#define GIT_STATUS_WT_MODIFIED (1 << 4) +#define GIT_STATUS_WT_DELETED (1 << 5) // TODO Ignored files not handled yet -#define GIT_STATUS_IGNORED (1 << 6) +#define GIT_STATUS_IGNORED (1 << 6) /** * Gather file statuses and run a callback for each one. diff --git a/include/git2/tag.h b/include/git2/tag.h index baf7f9d61..63a522882 100644 --- a/include/git2/tag.h +++ b/include/git2/tag.h @@ -152,7 +152,7 @@ GIT_EXTERN(const char *) git_tag_message(git_tag *tag); * must belong to the given `repo`. * * @param tagger Signature of the tagger for this tag, and - * of the tagging time + * of the tagging time * * @param message Full message for this tag * @@ -211,7 +211,7 @@ GIT_EXTERN(int) git_tag_create_frombuffer( * * @return GIT_SUCCESS or an error code * A proper reference is written in the /refs/tags folder, - * pointing to the provided target object + * pointing to the provided target object */ GIT_EXTERN(int) git_tag_create_lightweight( git_oid *oid, diff --git a/include/git2/thread-utils.h b/include/git2/thread-utils.h index e5085fc3a..81c62d135 100644 --- a/include/git2/thread-utils.h +++ b/include/git2/thread-utils.h @@ -10,51 +10,51 @@ /* * How TLS works is compiler+platform dependant * Sources: http://en.wikipedia.org/wiki/Thread-Specific_Storage - * http://predef.sourceforge.net/precomp.html + * http://predef.sourceforge.net/precomp.html */ #ifdef GIT_THREADS -# define GIT_HAS_TLS 1 +# define GIT_HAS_TLS 1 /* No TLS in Cygwin */ -# if defined(__CHECKER__) || defined(__CYGWIN__) -# undef GIT_HAS_TLS -# define GIT_TLS +# if defined(__CHECKER__) || defined(__CYGWIN__) +# undef GIT_HAS_TLS +# define GIT_TLS /* No TLS in Mach binaries for Mac OS X */ -# elif defined(__APPLE__) && defined(__MACH__) -# undef GIT_TLS -# define GIT_TLS +# elif defined(__APPLE__) && defined(__MACH__) +# undef GIT_TLS +# define GIT_TLS /* Normal TLS for GCC */ -# elif defined(__GNUC__) || \ - defined(__SUNPRO_C) || \ - defined(__SUNPRO_CC) || \ - defined(__xlc__) || \ - defined(__xlC__) -# define GIT_TLS __thread +# elif defined(__GNUC__) || \ + defined(__SUNPRO_C) || \ + defined(__SUNPRO_CC) || \ + defined(__xlc__) || \ + defined(__xlC__) +# define GIT_TLS __thread /* ICC may run on Windows or Linux */ -# elif defined(__INTEL_COMPILER) -# if defined(_WIN32) || defined(_WIN32_CE) -# define GIT_TLS __declspec(thread) -# else -# define GIT_TLS __thread -# endif +# elif defined(__INTEL_COMPILER) +# if defined(_WIN32) || defined(_WIN32_CE) +# define GIT_TLS __declspec(thread) +# else +# define GIT_TLS __thread +# endif /* Declspec for MSVC in Win32 */ -# elif defined(_WIN32) || \ - defined(_WIN32_CE) || \ - defined(__BORLANDC__) -# define GIT_TLS __declspec(thread) +# elif defined(_WIN32) || \ + defined(_WIN32_CE) || \ + defined(__BORLANDC__) +# define GIT_TLS __declspec(thread) /* Other platform; no TLS */ -# else -# undef GIT_HAS_TLS -# define GIT_TLS /* nothing: tls vars are thread-global */ -# endif +# else +# undef GIT_HAS_TLS +# define GIT_TLS /* nothing: tls vars are thread-global */ +# endif #else /* Disable TLS if libgit2 is not threadsafe */ -# define GIT_TLS +# define GIT_TLS #endif /* GIT_THREADS */ #endif /* INCLUDE_git_thread_utils_h__ */ diff --git a/include/git2/types.h b/include/git2/types.h index d4edda58f..1df18974a 100644 --- a/include/git2/types.h +++ b/include/git2/types.h @@ -36,7 +36,7 @@ GIT_BEGIN_DECL #if defined(_MSC_VER) typedef __int64 git_off_t; -typedef __time64_t git_time_t; +typedef __time64_t git_time_t; #elif defined(__MINGW32__) @@ -48,7 +48,7 @@ typedef __time64_t git_time_t; typedef __haiku_std_int64 git_off_t; typedef __haiku_std_int64 git_time_t; -#else /* POSIX */ +#else /* POSIX */ /* * Note: Can't use off_t since if a client program includes <sys/types.h> @@ -63,15 +63,15 @@ typedef int64_t git_time_t; /** Basic type (loose or packed) of any Git object. */ typedef enum { GIT_OBJ_ANY = -2, /**< Object can be any of the following */ - GIT_OBJ_BAD = -1, /**< Object is invalid. */ - GIT_OBJ__EXT1 = 0, /**< Reserved for future use. */ - GIT_OBJ_COMMIT = 1, /**< A commit object. */ - GIT_OBJ_TREE = 2, /**< A tree (directory listing) object. */ - GIT_OBJ_BLOB = 3, /**< A file revision object. */ - GIT_OBJ_TAG = 4, /**< An annotated tag object. */ - GIT_OBJ__EXT2 = 5, /**< Reserved for future use. */ - GIT_OBJ_OFS_DELTA = 6, /**< A delta, base is given by an offset. */ - GIT_OBJ_REF_DELTA = 7, /**< A delta, base is given by object id. */ + GIT_OBJ_BAD = -1, /**< Object is invalid. */ + GIT_OBJ__EXT1 = 0, /**< Reserved for future use. */ + GIT_OBJ_COMMIT = 1, /**< A commit object. */ + GIT_OBJ_TREE = 2, /**< A tree (directory listing) object. */ + GIT_OBJ_BLOB = 3, /**< A file revision object. */ + GIT_OBJ_TAG = 4, /**< An annotated tag object. */ + GIT_OBJ__EXT2 = 5, /**< Reserved for future use. */ + GIT_OBJ_OFS_DELTA = 6, /**< A delta, base is given by an offset. */ + GIT_OBJ_REF_DELTA = 7, /**< A delta, base is given by object id. */ } git_otype; /** An open object database handle. */ |