gout

A static git page generator
git clone https://git.bracken.jp/gout.git
Log | Files | Refs | README | LICENSE

file.h (480B)


      1 #ifndef GOUT_GIT_FILE_H_
      2 #define GOUT_GIT_FILE_H_
      3 
      4 #include <sys/types.h>
      5 
      6 #include "git/constants.h"
      7 
      8 typedef enum {
      9   kFileTypeFile,
     10   kFileTypeSubmodule,
     11 } FileType;
     12 
     13 typedef struct GitFile {
     14   FileType type;
     15   char mode[GOUT_FILEMODE_MAX_SIZE];
     16   char* display_path;
     17   char* repo_path;
     18   // Submodule commit OID. Empty string for files.
     19   char commit_oid[GOUT_OID_MAX_SIZE];
     20   ssize_t size_bytes;
     21   ssize_t size_lines;
     22   char* content;
     23 } GitFile;
     24 
     25 #endif  // GOUT_GIT_FILE_H_