diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 21:53:13 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-02-08 21:58:58 (JST) |
commit | ab2ab95f09994560f62fd631f07d3b6e3577aa6e (patch) | |
tree | 846763c1bcb78bd27dc37c99e5f6d703ca5ab179 /git.h | |
parent | 14d360df60f059b9b5b045fc6df1eec6f0966d9a (diff) | |
download | cgit-ab2ab95f09994560f62fd631f07d3b6e3577aa6e.zip cgit-ab2ab95f09994560f62fd631f07d3b6e3577aa6e.tar.gz |
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.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -669,4 +669,31 @@ int log_tree_commit(struct rev_info *, struct commit *); | |||
669 | 669 | ||
670 | 670 | ||
671 | 671 | ||
672 | /* from git:archive.h */ | ||
673 | |||
674 | struct archiver_args { | ||
675 | const char *base; | ||
676 | struct tree *tree; | ||
677 | const unsigned char *commit_sha1; | ||
678 | time_t time; | ||
679 | const char **pathspec; | ||
680 | unsigned int verbose : 1; | ||
681 | void *extra; | ||
682 | }; | ||
683 | |||
684 | typedef int (*write_archive_fn_t)(struct archiver_args *); | ||
685 | |||
686 | typedef void *(*parse_extra_args_fn_t)(int argc, const char **argv); | ||
687 | |||
688 | struct archiver { | ||
689 | const char *name; | ||
690 | struct archiver_args args; | ||
691 | write_archive_fn_t write_archive; | ||
692 | parse_extra_args_fn_t parse_extra; | ||
693 | }; | ||
694 | |||
695 | extern int write_tar_archive(struct archiver_args *); | ||
696 | extern int write_zip_archive(struct archiver_args *); | ||
697 | extern void *parse_extra_zip_args(int argc, const char **argv); | ||
698 | |||
672 | #endif /* GIT_H */ | 699 | #endif /* GIT_H */ |