1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-18 06:54:55 +01:00
git/log-tree.h
Junio C Hamano f4235f8b2e Extract "log [diff options]" parser out.
Merging of the log-tree-opt structure with rev-info structure
did not work out very well and it broke things that did not want
diff options and/or rev options.

This is an alternative approach to define a combined interface
that can be used by commands that wants both.  The use of it is
opt-in to reduce the risk of breaking existing programs.

We might want to slurp "setup_revisions() places things in
pending objects list" part from Linus's earlier attempt.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-15 03:24:33 -07:00

37 lines
833 B
C

#ifndef LOG_TREE_H
#define LOG_TREE_H
#include "revision.h"
struct log_tree_opt {
struct diff_options diffopt;
int show_root_diff;
int no_commit_id;
int verbose_header;
int ignore_merges;
int combine_merges;
int dense_combined_merges;
int always_show_header;
const char *header_prefix;
const char *header;
enum cmit_fmt commit_format;
};
void init_log_tree_opt(struct log_tree_opt *);
int log_tree_diff_flush(struct log_tree_opt *);
int log_tree_commit(struct log_tree_opt *, struct commit *);
int log_tree_opt_parse(struct log_tree_opt *, const char **, int);
struct whatchanged_opt {
struct rev_info revopt;
struct log_tree_opt logopt;
enum cmit_fmt commit_format;
int abbrev;
int abbrev_commit;
int do_diff;
int full_diff;
};
int parse_whatchanged_opt(int, const char **, struct whatchanged_opt *);
#endif