Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/git2/diff.h19
-rw-r--r--include/git2/errors.h1
-rw-r--r--include/git2/filter.h37
-rw-r--r--include/git2/submodule.h11
-rw-r--r--include/git2/version.h6
5 files changed, 58 insertions, 16 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index b3ab5397e..0abbc7f06 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -836,6 +836,25 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
const git_diff_options *opts); /**< can be NULL for defaults */
/**
+ * Create a diff with the difference between two index objects.
+ *
+ * The first index will be used for the "old_file" side of the delta and the
+ * second index will be used for the "new_file" side of the delta.
+ *
+ * @param diff Output pointer to a git_diff pointer to be allocated.
+ * @param repo The repository containing the indexes.
+ * @param old_index A git_index object to diff from.
+ * @param new_index A git_index object to diff to.
+ * @param opts Structure with options to influence diff or NULL for defaults.
+ */
+GIT_EXTERN(int) git_diff_index_to_index(
+ git_diff **diff,
+ git_repository *repo,
+ git_index *old_index,
+ git_index *new_index,
+ const git_diff_options *opts); /**< can be NULL for defaults */
+
+/**
* Merge one diff into another.
*
* This merges items from the "from" list into the "onto" list. The
diff --git a/include/git2/errors.h b/include/git2/errors.h
index 5ff0f35b5..a81aa05d9 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -47,6 +47,7 @@ typedef enum {
GIT_EPEEL = -19, /**< The requested peel operation is not possible */
GIT_EEOF = -20, /**< Unexpected EOF */
GIT_EINVALID = -21, /**< Invalid operation or input */
+ GIT_EUNCOMMITTED = -22, /**< Uncommitted changes in index prevented operation */
GIT_PASSTHROUGH = -30, /**< Internal only */
GIT_ITEROVER = -31, /**< Signals end of iteration with iterator */
diff --git a/include/git2/filter.h b/include/git2/filter.h
index 1828903e4..436a0f3c8 100644
--- a/include/git2/filter.h
+++ b/include/git2/filter.h
@@ -137,7 +137,13 @@ GIT_EXTERN(int) git_filter_list_apply_to_data(
git_buf *in);
/**
- * Apply filter list to the contents of a file on disk
+ * Apply a filter list to the contents of a file on disk
+ *
+ * @param out buffer into which to store the filtered file
+ * @param filters the list of filters to apply
+ * @param repo the repository in which to perform the filtering
+ * @param path the path of the file to filter, a relative path will be
+ * taken as relative to the workdir
*/
GIT_EXTERN(int) git_filter_list_apply_to_file(
git_buf *out,
@@ -146,24 +152,51 @@ GIT_EXTERN(int) git_filter_list_apply_to_file(
const char *path);
/**
- * Apply filter list to the contents of a blob
+ * Apply a filter list to the contents of a blob
+ *
+ * @param out buffer into which to store the filtered file
+ * @param filters the list of filters to apply
+ * @param blob the blob to filter
*/
GIT_EXTERN(int) git_filter_list_apply_to_blob(
git_buf *out,
git_filter_list *filters,
git_blob *blob);
+/**
+ * Apply a filter list to an arbitrary buffer as a stream
+ *
+ * @param filters the list of filters to apply
+ * @param data the buffer to filter
+ * @param target the stream into which the data will be written
+ */
GIT_EXTERN(int) git_filter_list_stream_data(
git_filter_list *filters,
git_buf *data,
git_writestream *target);
+/**
+ * Apply a filter list to a file as a stream
+ *
+ * @param filters the list of filters to apply
+ * @param repo the repository in which to perform the filtering
+ * @param path the path of the file to filter, a relative path will be
+ * taken as relative to the workdir
+ * @param target the stream into which the data will be written
+ */
GIT_EXTERN(int) git_filter_list_stream_file(
git_filter_list *filters,
git_repository *repo,
const char *path,
git_writestream *target);
+/**
+ * Apply a filter list to a blob as a stream
+ *
+ * @param filters the list of filters to apply
+ * @param blob the blob to filter
+ * @param target the stream into which the data will be written
+ */
GIT_EXTERN(int) git_filter_list_stream_blob(
git_filter_list *filters,
git_blob *blob,
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index cbafccd1b..689fe4b64 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -584,17 +584,6 @@ GIT_EXTERN(int) git_submodule_open(
GIT_EXTERN(int) git_submodule_reload(git_submodule *submodule, int force);
/**
- * Reread all submodule info.
- *
- * Call this to reload all cached submodule information for the repo.
- *
- * @param repo The repository to reload submodule data for
- * @param force Force full reload even if the data doesn't seem out of date
- * @return 0 on success, <0 on error
- */
-GIT_EXTERN(int) git_submodule_reload_all(git_repository *repo, int force);
-
-/**
* Get the status for a submodule.
*
* This looks at a submodule and tries to determine the status. It
diff --git a/include/git2/version.h b/include/git2/version.h
index 456bbe258..6837e90ef 100644
--- a/include/git2/version.h
+++ b/include/git2/version.h
@@ -7,12 +7,12 @@
#ifndef INCLUDE_git_version_h__
#define INCLUDE_git_version_h__
-#define LIBGIT2_VERSION "0.22.0"
+#define LIBGIT2_VERSION "0.23.0"
#define LIBGIT2_VER_MAJOR 0
-#define LIBGIT2_VER_MINOR 22
+#define LIBGIT2_VER_MINOR 23
#define LIBGIT2_VER_REVISION 0
#define LIBGIT2_VER_PATCH 0
-#define LIBGIT2_SOVERSION 22
+#define LIBGIT2_SOVERSION 23
#endif