]> gitweb.ps.run Git - ps-cgit/blobdiff - git.h
Add support for snapshots
[ps-cgit] / git.h
diff --git a/git.h b/git.h
index 991eaa5e313c9524419545b4c3ab3b1f0c212123..a1d1c4bea4a5d7f27cc33eca026729e6bdedb9e6 100644 (file)
--- a/git.h
+++ b/git.h
@@ -278,6 +278,10 @@ struct object {
 };
 
 
+/** Returns the object, having parsed it to find out what it is. **/
+struct object *parse_object(const unsigned char *sha1);
+
+
 /*
  * from git:tree.h
  */
@@ -665,4 +669,31 @@ int log_tree_commit(struct rev_info *, struct commit *);
 
 
 
+/* from git:archive.h */
+
+struct archiver_args {
+       const char *base;
+       struct tree *tree;
+       const unsigned char *commit_sha1;
+       time_t time;
+       const char **pathspec;
+       unsigned int verbose : 1;
+       void *extra;
+};
+
+typedef int (*write_archive_fn_t)(struct archiver_args *);
+
+typedef void *(*parse_extra_args_fn_t)(int argc, const char **argv);
+
+struct archiver {
+       const char *name;
+       struct archiver_args args;
+       write_archive_fn_t write_archive;
+       parse_extra_args_fn_t parse_extra;
+};
+
+extern int write_tar_archive(struct archiver_args *);
+extern int write_zip_archive(struct archiver_args *);
+extern void *parse_extra_zip_args(int argc, const char **argv);
+
 #endif /* GIT_H */