packages feed

hlibgit2 0.17.0.4 → 0.17.0.5

raw patch · 6 files changed

+37/−1 lines, 6 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Bindings.Libgit2.Tree: c'git_treebuilder_entrycount :: Ptr C'git_treebuilder -> IO (CUInt)
+ Bindings.Libgit2.Tree: p'git_treebuilder_entrycount :: FunPtr (Ptr C'git_treebuilder -> IO (CUInt))

Files

Bindings/Libgit2/Tree.hsc view
@@ -13,6 +13,7 @@ #cinline git_tree_free , Ptr <git_tree> -> IO () #ccall git_tree_id , Ptr <git_tree> -> IO (Ptr <git_oid>) #ccall git_tree_entrycount , Ptr <git_tree> -> IO (CUInt)+#ccall git_treebuilder_entrycount , Ptr <git_treebuilder> -> IO (CUInt) #ccall git_tree_entry_byname , Ptr <git_tree> -> CString -> IO (Ptr <git_tree_entry>) #ccall git_tree_entry_byindex , Ptr <git_tree> -> CUInt -> IO (Ptr <git_tree_entry>) #ccall git_tree_entry_attributes , Ptr <git_tree_entry> -> IO (CUInt)
hlibgit2.cabal view
@@ -1,5 +1,5 @@ Name:                hlibgit2-Version:             0.17.0.4+Version:             0.17.0.5 Synopsis:            Low-level bindings to libgit2 Description:         Bindings to libgit2 v0.17.0. License-file:        LICENSE
libgit2/include/git2/repository.h view
@@ -85,6 +85,14 @@ 	const char *ceiling_dirs);  /**+ * Create a new repository with neither backends nor config object+ *+ * Note that this is only useful if you wish to associate the repository+ * with a non-filesystem-backed object database and config store.+ */+GIT_EXTERN(int) git_repository_new(git_repository **out);++/**  * Free a previously allocated repository  *  * Note that after a repository is free'd, all the objects it has spawned
libgit2/include/git2/tree.h view
@@ -190,6 +190,14 @@ GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);  /**+ * Get the number of entries listed in a treebuilder+ *+ * @param tree a previously loaded treebuilder.+ * @return the number of entries in the treebuilder+ */+GIT_EXTERN(unsigned int) git_treebuilder_entrycount(git_treebuilder *bld);++/**  * Free a tree builder  *  * This will clear all the entries and free to builder.
libgit2/src/repository.c view
@@ -116,6 +116,12 @@ 	return repo; } +int git_repository_new(git_repository **out)+{+	*out = repository_alloc();+	return 0;+}+ static int load_config_data(git_repository *repo) { 	int is_bare;
libgit2/src/tree.c view
@@ -231,6 +231,19 @@ 	return tree->entries.length; } +unsigned int git_treebuilder_entrycount(git_treebuilder *bld)+{+        int count = 0;+        int i;+	assert(bld);+	for (i = 0; i < bld->entries.length; ++i) {+		git_tree_entry *entry = bld->entries.contents[i];+		if (! entry->removed)+                  ++count;+	}+	return count;+}+ static int tree_error(const char *str) { 	giterr_set(GITERR_TREE, "%s", str);