diff options
author | Galin Simeonov <gts@volconst.com> | 2021-09-27 00:51:19 +0300 |
---|---|---|
committer | Galin Simeonov <gts@volconst.com> | 2021-09-27 00:51:19 +0300 |
commit | 35a3d5be72654d744563c8d4ca5d1014563fc1d9 (patch) | |
tree | bfb221bb07239b90bd8e1f845707fd9639f174db /git_part.c | |
parent | 8c9ec9a22944e4d47b707d01f084e31ce4512f8a (diff) | |
download | volgit-35a3d5be72654d744563c8d4ca5d1014563fc1d9.tar.gz |
added a skeleton for a man page
Diffstat (limited to 'git_part.c')
-rw-r--r-- | git_part.c | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -99,22 +99,24 @@ void print_commits(int dir_fd,const git_reference *branch, git_repository *repo) } void print_commit(git_commit *current_commit,git_commit *parent_commit,FILE *log_file,int diff_directory_fd,git_repository *repo) { - git_tree *current_tree; - git_tree *parent_tree; - FILE *diff_file; + git_tree *current_tree; + git_tree *parent_tree; + FILE *diff_file; - git_commit_tree(¤t_tree,current_commit); - if(parent_commit==NULL) - parent_tree=NULL; - else - git_commit_tree(&parent_tree,parent_commit); + git_commit_tree(¤t_tree,current_commit); + if(parent_commit==NULL) + parent_tree=NULL; + else + git_commit_tree(&parent_tree,parent_commit); + + diff_file=create_file(diff_directory_fd,git_oid_tostr_s(git_commit_id(current_commit))); - diff_file=create_file(diff_directory_fd,git_oid_tostr_s(git_commit_id(current_commit))); + print_diff(diff_file,parent_tree,current_tree,repo); - print_diff(diff_file,parent_tree,current_tree,repo); + git_tree_free(parent_tree); + print_headers_and_commit_message(log_file,current_commit,git_commit_id(current_commit),1); - git_tree_free(parent_tree); - print_headers_and_commit_message(log_file,current_commit,git_commit_id(current_commit),1); + close_file(diff_file); } void print_branches(git_repository *repo) @@ -160,6 +162,7 @@ void print_files(int dir_fd,git_tree *tree,git_repository *repo) print_entry(index_file,current_entry,dir_fd,repo); fprintf(index_file,"\n<br>\n"); } + close_file(index_file); } void print_files_top(int dir_fd,git_commit *top_commit,git_repository *repo) { |