OSDN Git Service

Add git diff support at gitdll
[tortoisegit/TortoiseGitJp.git] / ext / gitdll / gitdll.h
index 3cec3d7..2053fc4 100644 (file)
@@ -31,8 +31,8 @@ typedef unsigned char GIT_HASH[GIT_HASH_SIZE];
 typedef unsigned int  GIT_HANDLE;\r
 typedef unsigned int  GIT_LOG;\r
 \r
-typedef unsigned int  GIT_DIFF;\r
-typedef unsigned int  GIT_FILE;\r
+typedef unsigned int GIT_DIFF;\r
+typedef unsigned int GIT_FILE;\r
 \r
 struct GIT_COMMIT_AUTHOR\r
 {\r
@@ -80,14 +80,33 @@ GITDLL_API int git_get_sha1(const char *name, GIT_HASH sha1);
 GITDLL_API int git_init();\r
 \r
 GITDLL_API int git_open_log(GIT_LOG * handle, char * arg);\r
-GITDLL_API int git_get_log_count(GIT_LOG handle);\r
-GITDLL_API int git_get_log_firstcommit(GIT_LOG handle, GIT_COMMIT *commit);\r
-GITDLL_API int git_get_log_nextcommit(GIT_LOG handle, GIT_COMMIT *commit, int skip);\r
+GITDLL_API int git_get_log_firstcommit(GIT_LOG handle);\r
+\r
+/**\r
+ *     Get Next Commit\r
+ *  @param handle      [IN]handle  Get handle from git_open_log\r
+ *     @param commit   [OUT]commit     Caller need prepare buffer for this call\r
+ *  @return                    0       success\r
+ *     @remark                 Caller need call git_free_commit to free internal buffer after use it;\r
+ */\r
+GITDLL_API int git_get_log_nextcommit(GIT_LOG handle, GIT_COMMIT *commit);\r
+\r
 GITDLL_API int git_close_log(GIT_LOG handle);\r
 \r
+/**\r
+ *     Get Commit information from commit hash\r
+ *     @param  commit  [OUT] output commit information\r
+ *  @param     hash    [in] hash \r
+ *     @return         0       success\r
+ */\r
 GITDLL_API int git_get_commit_from_hash(GIT_COMMIT *commit, GIT_HASH hash);\r
+GITDLL_API int git_parse_commit(GIT_COMMIT *commit);\r
+GITDLL_API int git_free_commit(GIT_COMMIT *commit);\r
+\r
+GITDLL_API int git_open_diff(GIT_DIFF *diff, char * arg);\r
+GITDLL_API int git_diff(GIT_DIFF diff, GIT_HASH hash1,GIT_HASH hash2);\r
+GITDLL_API int git_close_diff(GIT_DIFF diff);\r
 \r
-GITDLL_API int git_get_diff(GIT_COMMIT commit, GIT_DIFF *diff);\r
 GITDLL_API int git_get_diff_firstfile(GIT_DIFF diff, GIT_FILE * file);\r
 GITDLL_API int git_get_diff_nextfile(GIT_DIFF diff, GIT_FILE *file);\r
 GITDLL_API int git_get_diff_status(GIT_DIFF diff, int * status);\r