summaryrefslogtreecommitdiff
path: root/git.h
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-02-08 13:53:13 +0100
committerLars Hjemli <hjemli@gmail.com>2007-02-08 13:58:58 +0100
commitab2ab95f09994560f62fd631f07d3b6e3577aa6e (patch)
tree846763c1bcb78bd27dc37c99e5f6d703ca5ab179 /git.h
parent14d360df60f059b9b5b045fc6df1eec6f0966d9a (diff)
downloadcgit-ab2ab95f09994560f62fd631f07d3b6e3577aa6e.tar.gz
cgit-ab2ab95f09994560f62fd631f07d3b6e3577aa6e.tar.bz2
cgit-ab2ab95f09994560f62fd631f07d3b6e3577aa6e.zip
Add support for snapshots
Make a link from the commit viewer to a snapshot of the corresponding tree. Currently only zip-format is supported. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'git.h')
-rw-r--r--git.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/git.h b/git.h
index eca48d5..a1d1c4b 100644
--- a/git.h
+++ b/git.h
@@ -669,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 */