cGit-UI for Git Repositories

cGit-UI – is a web interface for Git Repositories. cGit CGI script is writen in C and therefore it's fast enough

12 Commits   0 Branches   1 Tag
     5         kx 
     5         kx #ifndef    __GIT_SHARED_H
     5         kx #define    __GIT_SHARED_H
     5         kx 
     5         kx #ifdef __cplusplus
     5         kx extern "C" {
     5         kx #endif
     5         kx 
     5         kx 
     5         kx typedef void (*cgit_errfunc)( const char *fmt, ... );
     5         kx 
     5         kx extern void cgit_error( const char *fmt, ... ) __attribute__((format (printf,1,2)));
     5         kx extern cgit_errfunc cgit_fatal; /* Default Fatal Error Function == cgit_error() */
     5         kx 
     5         kx struct short_commit_info {
     5         kx   char       rev[GIT_OID_HEXSZ+1];
     5         kx   git_time_t date;
     5         kx   int        offset;
     5         kx };
     5         kx 
     5         kx extern int is_bare( const char *path );
     5         kx extern git_repository *open_repository( const char *path );
     5         kx extern git_commit *get_commit_by_ref( git_repository *repo, const char *ref );
     5         kx extern git_commit *get_commit_by_hex( git_repository *repo, const char *hex );
     5         kx extern void close_repository( git_repository *repo );
     5         kx 
     5         kx extern void fill_short_commit_info( struct short_commit_info *info, const char *path );
     5         kx extern void fill_commit_info( struct cgit_info *info, const char *path, const char *rpath );
     5         kx extern void fill_mime_info( struct cgit_info *info, const char *path, const char *rpath );
     5         kx 
     5         kx extern size_t branches_number( const char *path, const char *skip );
     5         kx extern size_t tags_number( const char *path );
     5         kx 
     5         kx struct cgit_ref_names {
     5         kx   char **name;
     5         kx   size_t  len;
     5         kx };
     5         kx 
     5         kx extern struct cgit_ref_names *cgit_ref_names_new( void );
     5         kx extern void cgit_ref_names_allocate( struct cgit_ref_names **ref_names );
     5         kx extern void cgit_ref_names_add( struct cgit_ref_names *names, const char *name );
     5         kx extern void cgit_ref_names_free( struct cgit_ref_names *names );
     5         kx 
     5         kx extern void lookup_branches_by_prefix( struct cgit_ref_names **ref_names, const char *prefix );
     5         kx extern void lookup_tags_by_prefix( struct cgit_ref_names **ref_names, const char *prefix );
     5         kx 
     5         kx struct cgit_hex_commits {
     5         kx   char  **hex;
     5         kx   size_t  len;
     5         kx };
     5         kx 
     5         kx extern struct cgit_hex_commits *cgit_hex_commits_new( void );
     5         kx extern void cgit_hex_commits_allocate( struct cgit_hex_commits **hex_commits );
     5         kx extern void cgit_hex_commits_add( struct cgit_hex_commits *commits, const char *hex );
     5         kx extern void cgit_hex_commits_free( struct cgit_hex_commits *commits );
     5         kx 
     5         kx extern void parse_relative_path( char *ref, char *rpath, const char *relative_path );
     5         kx 
     5         kx extern void cgit_fill_commits_list( struct cgit_hex_commits **hex_commits, int ofs, const char *relative_path, const char *revision );
     5         kx 
     5         kx extern git_repository *cgit_open_repository( void );
     5         kx extern git_commit *lookup_commit_by_ref( const char *ref );
     5         kx extern git_commit *lookup_commit_by_hex( const char *hex );
     5         kx 
     5         kx extern void cgit_fill_diff_with_parent( struct strbuf *sb, char *parent_hex, size_t parent_len, int *files, int *insertions, int *deletions, const char *hex );
     5         kx extern void cgit_diff_with_parent( struct strbuf *sb, char *parent_hex, size_t parent_len, int *files, int *insertions, int *deletions, const char *hex, const char *relative_path );
     5         kx 
     5         kx 
     5         kx #ifdef __cplusplus
     5         kx }
     5         kx #endif
     5         kx 
     5         kx #endif  /* __GIT_SHARED_H */