fast_export.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef FAST_EXPORT_H
  2. #define FAST_EXPORT_H
  3. struct strbuf;
  4. struct line_buffer;
  5. void fast_export_init(int fd);
  6. void fast_export_deinit(void);
  7. void fast_export_delete(const char *path);
  8. void fast_export_modify(const char *path, uint32_t mode, const char *dataref);
  9. void fast_export_note(const char *committish, const char *dataref);
  10. void fast_export_begin_note(uint32_t revision, const char *author,
  11. const char *log, timestamp_t timestamp, const char *note_ref);
  12. void fast_export_begin_commit(uint32_t revision, const char *author,
  13. const struct strbuf *log, const char *uuid,const char *url,
  14. timestamp_t timestamp, const char *local_ref);
  15. void fast_export_end_commit(uint32_t revision);
  16. void fast_export_data(uint32_t mode, off_t len, struct line_buffer *input);
  17. void fast_export_buf_to_data(const struct strbuf *data);
  18. void fast_export_blob_delta(uint32_t mode,
  19. uint32_t old_mode, const char *old_data,
  20. off_t len, struct line_buffer *input);
  21. /* If there is no such file at that rev, returns -1, errno == ENOENT. */
  22. int fast_export_ls_rev(uint32_t rev, const char *path,
  23. uint32_t *mode_out, struct strbuf *dataref_out);
  24. int fast_export_ls(const char *path,
  25. uint32_t *mode_out, struct strbuf *dataref_out);
  26. void fast_export_copy(uint32_t revision, const char *src, const char *dst);
  27. const char *fast_export_read_path(const char *path, uint32_t *mode_out);
  28. #endif