summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-10-17 22:22:59 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-10-18 15:22:19 +0200
commit12e1803188407e6ee18b9bd22186dd5d02c8ba78 (patch)
tree496b54f10f56faa0588bcdebfd6d579f343b90c0
parentc51aa74ed38c2b8b86d5dbd2c8e58e45975db38a (diff)
downloadlibgit2-12e1803188407e6ee18b9bd22186dd5d02c8ba78.tar.gz
Update some documentation
-rw-r--r--include/git2/diff.h4
-rw-r--r--include/git2/net.h4
-rw-r--r--include/git2/revwalk.h51
-rw-r--r--include/git2/types.h15
4 files changed, 47 insertions, 27 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index ca49a9cd9..1013b5c33 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -421,7 +421,7 @@ typedef int (*git_diff_file_cb)(
/**
* Structure describing a hunk of a diff.
*/
-typedef struct git_diff_hunk {
+typedef struct {
int old_start; /**< Starting line number in old_file */
int old_lines; /**< Number of lines in old_file */
int new_start; /**< Starting line number in new_file */
@@ -468,7 +468,7 @@ typedef enum {
/**
* Structure describing a line (or data span) of a diff.
*/
-typedef struct git_diff_line {
+typedef struct {
char origin; /**< A git_diff_line_t value */
int old_lineno; /**< Line number in old file or -1 for added line */
int new_lineno; /**< Line number in new file or -1 for deleted line */
diff --git a/include/git2/net.h b/include/git2/net.h
index a727696a2..8cffa18dc 100644
--- a/include/git2/net.h
+++ b/include/git2/net.h
@@ -32,9 +32,9 @@ typedef enum {
GIT_DIRECTION_PUSH = 1
} git_direction;
-
/**
- * Remote head description, given out on `ls` calls.
+ * Description of a reference advertised by a remote server, given out
+ * on `ls` calls.
*/
struct git_remote_head {
int local; /* available locally */
diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h
index 1bd6186f3..0a5fdce21 100644
--- a/include/git2/revwalk.h
+++ b/include/git2/revwalk.h
@@ -21,33 +21,38 @@
GIT_BEGIN_DECL
/**
- * Sort the repository contents in no particular ordering;
- * this sorting is arbitrary, implementation-specific
- * and subject to change at any time.
- * This is the default sorting for new walkers.
+ * Flags to specify the sorting which a revwalk should perform.
*/
-#define GIT_SORT_NONE (0)
+typedef enum {
+ /**
+ * Sort the repository contents in no particular ordering;
+ * this sorting is arbitrary, implementation-specific
+ * and subject to change at any time.
+ * This is the default sorting for new walkers.
+ */
+ 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)
+ /**
+ * Sort the repository contents in topological order
+ * (parents before children); this sorting mode
+ * can be combined with time sorting.
+ */
+ 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)
+ /**
+ * Sort the repository contents by commit time;
+ * this sorting mode can be combined with
+ * topological sorting.
+ */
+ 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)
+ /**
+ * Iterate through the repository contents in reverse
+ * order; this sorting mode can be combined with
+ * any of the above.
+ */
+ GIT_SORT_REVERSE = 1 << 2,
+} git_sort_t;
/**
* Allocate a new revision walker to iterate through a repo.
diff --git a/include/git2/types.h b/include/git2/types.h
index 64cdfcdda..16933976e 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -209,10 +209,25 @@ typedef enum {
GIT_FILEMODE_COMMIT = 0160000,
} git_filemode_t;
+/*
+ * A refspec specifies the mapping between remote and local reference
+ * names when fetch or pushing.
+ */
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).
+ */
typedef struct git_remote git_remote;
+
+/**
+ * Preparation for a push operation. Can be used to configure what to
+ * push and the level of parallelism of the packfile builder.
+ */
typedef struct git_push git_push;
+/* documentation in the definition */
typedef struct git_remote_head git_remote_head;
typedef struct git_remote_callbacks git_remote_callbacks;