c0e6c23dca
repo_tree maintains the exporter's state and provides a facility to to call fast_export, which writes objects to stdout suitable for consumption by fast-import. The exported functions roughly correspond to Subversion FS operations. . repo_add, repo_modify, repo_copy, repo_replace, and repo_delete update the current commit, based roughly on the corresponding Subversion FS operation. . repo_commit calls out to fast_export to write the current commit to the fast-import stream in stdout. . repo_diff is used by the fast_export module to write the changes for a commit. . repo_reset erases the exporter's state, so valgrind can be happy. [rr: squelched compiler warnings] [jn: removed support for maintaining state on-disk, though we may want to add it back later] Signed-off-by: David Barr <david.barr@cordelta.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
27 lines
804 B
C
27 lines
804 B
C
#ifndef REPO_TREE_H_
|
|
#define REPO_TREE_H_
|
|
|
|
#include "git-compat-util.h"
|
|
|
|
#define REPO_MODE_DIR 0040000
|
|
#define REPO_MODE_BLB 0100644
|
|
#define REPO_MODE_EXE 0100755
|
|
#define REPO_MODE_LNK 0120000
|
|
|
|
#define REPO_MAX_PATH_LEN 4096
|
|
#define REPO_MAX_PATH_DEPTH 1000
|
|
|
|
uint32_t next_blob_mark(void);
|
|
uint32_t repo_copy(uint32_t revision, uint32_t *src, uint32_t *dst);
|
|
void repo_add(uint32_t *path, uint32_t mode, uint32_t blob_mark);
|
|
uint32_t repo_replace(uint32_t *path, uint32_t blob_mark);
|
|
void repo_modify(uint32_t *path, uint32_t mode, uint32_t blob_mark);
|
|
void repo_delete(uint32_t *path);
|
|
void repo_commit(uint32_t revision, uint32_t author, char *log, uint32_t uuid,
|
|
uint32_t url, long unsigned timestamp);
|
|
void repo_diff(uint32_t r1, uint32_t r2);
|
|
void repo_init(void);
|
|
void repo_reset(void);
|
|
|
|
#endif
|