git/builtin/log.c

/*
 * Builtin "git log" and related commands (show, whatchanged)
 *
 * (C) Copyright 2006 Linus Torvalds
 *		 2006 Junio Hamano
 */
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "object-file.h"
#include "object-name.h"
#include "object-store-ll.h"
#include "pager.h"
#include "color.h"
#include "commit.h"
#include "diff.h"
#include "diff-merges.h"
#include "revision.h"
#include "log-tree.h"
#include "builtin.h"
#include "oid-array.h"
#include "tag.h"
#include "reflog-walk.h"
#include "patch-ids.h"
#include "shortlog.h"
#include "remote.h"
#include "string-list.h"
#include "parse-options.h"
#include "line-log.h"
#include "branch.h"
#include "streaming.h"
#include "version.h"
#include "mailmap.h"
#include "progress.h"
#include "commit-slab.h"

#include "commit-reach.h"
#include "range-diff.h"
#include "tmp-objdir.h"
#include "tree.h"
#include "write-or-die.h"

#define MAIL_DEFAULT_WRAP
#define COVER_FROM_AUTO_MAX_SUBJECT_LEN
#define FORMAT_PATCH_NAME_MAX_DEFAULT

static unsigned int force_in_body_from;
static int stdout_mboxrd;
static int format_no_prefix;

static const char * const builtin_log_usage[] =;

struct line_opt_callback_data {};

static int session_is_interactive(void)
{}

static int auto_decoration_style(void)
{}

static int parse_decoration_style(const char *value)
{}

struct log_config {};

static void log_config_init(struct log_config *cfg)
{}

static void log_config_release(struct log_config *cfg)
{}

static int use_default_decoration_filter =;
static struct string_list decorate_refs_exclude =;
static struct string_list decorate_refs_exclude_config =;
static struct string_list decorate_refs_include =;

static int clear_decorations_callback(const struct option *opt UNUSED,
				      const char *arg, int unset)
{}

static int decorate_callback(const struct option *opt, const char *arg,
			     int unset)
{}

static int log_line_range_callback(const struct option *option, const char *arg, int unset)
{}

static void cmd_log_init_defaults(struct rev_info *rev,
				  struct log_config *cfg)
{}

static void set_default_decoration_filter(struct decoration_filter *decoration_filter)
{}

static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
			 struct rev_info *rev, struct setup_revision_opt *opt,
			 struct log_config *cfg)
{}

static void cmd_log_init(int argc, const char **argv, const char *prefix,
			 struct rev_info *rev, struct setup_revision_opt *opt,
			 struct log_config *cfg)
{}

/*
 * This gives a rough estimate for how many commits we
 * will print out in the list.
 */
static int estimate_commit_count(struct commit_list *list)
{}

static void show_early_header(struct rev_info *rev, const char *stage, int nr)
{}

static struct itimerval early_output_timer;

static void log_show_early(struct rev_info *revs, struct commit_list *list)
{}

static void early_output(int signal UNUSED)
{}

static void setup_early_output(void)
{}

static void finish_early_output(struct rev_info *rev)
{}

static int cmd_log_walk_no_free(struct rev_info *rev)
{}

static int cmd_log_walk(struct rev_info *rev)
{}

static int git_log_config(const char *var, const char *value,
			  const struct config_context *ctx, void *cb)
{}

int cmd_whatchanged(int argc,
		    const char **argv,
		    const char *prefix,
		    struct repository *repo UNUSED)
{}

static void show_tagger(const char *buf, struct rev_info *rev)
{}

static int show_blob_object(const struct object_id *oid, struct rev_info *rev, const char *obj_name)
{}

static int show_tag_object(const struct object_id *oid, struct rev_info *rev)
{}

static int show_tree_object(const struct object_id *oid UNUSED,
			    struct strbuf *base UNUSED,
			    const char *pathname, unsigned mode,
			    void *context)
{}

static void show_setup_revisions_tweak(struct rev_info *rev)
{}

int cmd_show(int argc,
	     const char **argv,
	     const char *prefix,
	     struct repository *repo UNUSED)
{}

/*
 * This is equivalent to "git log -g --abbrev-commit --pretty=oneline"
 */
int cmd_log_reflog(int argc,
		   const char **argv,
		   const char *prefix,
		   struct repository *repo UNUSED)
{}

static void log_setup_revisions_tweak(struct rev_info *rev)
{}

int cmd_log(int argc,
	    const char **argv,
	    const char *prefix,
	    struct repository *repo UNUSED)
{}

/* format-patch */

enum cover_setting {};

enum thread_level {};

enum cover_from_description {};

enum auto_base_setting {};

struct format_config {};

static void format_config_init(struct format_config *cfg)
{}

static void format_config_release(struct format_config *cfg)
{}

static enum cover_from_description parse_cover_from_description(const char *arg)
{}

static void add_header(struct format_config *cfg, const char *value)
{}

static int git_format_config(const char *var, const char *value,
			     const struct config_context *ctx, void *cb)
{}

static const char *output_directory =;
static int outdir_offset;

static int open_next_file(struct commit *commit, const char *subject,
			 struct rev_info *rev, int quiet)
{}

static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
{}

static void gen_message_id(struct rev_info *info, const char *base)
{}

static void print_signature(const char *signature, FILE *file)
{}

static char *find_branch_name(struct rev_info *rev)
{}

static void show_diffstat(struct rev_info *rev,
			  struct commit *origin, struct commit *head)
{}

static void read_desc_file(struct strbuf *buf, const char *desc_file)
{}

static void prepare_cover_text(struct pretty_print_context *pp,
			       const char *description_file,
			       const char *branch_name,
			       struct strbuf *sb,
			       const char *encoding,
			       int need_8bit_cte,
			       const struct format_config *cfg)
{}

static int get_notes_refs(struct string_list_item *item, void *arg)
{}

static void get_notes_args(struct strvec *arg, struct rev_info *rev)
{}

static void make_cover_letter(struct rev_info *rev, int use_separate_file,
			      struct commit *origin,
			      int nr, struct commit **list,
			      const char *description_file,
			      const char *branch_name,
			      int quiet,
			      const struct format_config *cfg)
{}

static char *clean_message_id(const char *msg_id)
{}

static const char *set_outdir(const char *prefix, const char *output_directory)
{}

static const char * const builtin_format_patch_usage[] =;

struct keep_callback_data {};

static int keep_callback(const struct option *opt, const char *arg, int unset)
{}

static int subject_prefix_callback(const struct option *opt, const char *arg,
			    int unset)
{}

static int rfc_callback(const struct option *opt, const char *arg,
			int unset)
{}

static int numbered_callback(const struct option *opt, const char *arg,
			     int unset)
{}

static int no_numbered_callback(const struct option *opt, const char *arg,
				int unset)
{}

static int output_directory_callback(const struct option *opt, const char *arg,
			      int unset)
{}

static int thread_callback(const struct option *opt, const char *arg, int unset)
{}

static int attach_callback(const struct option *opt, const char *arg, int unset)
{}

static int inline_callback(const struct option *opt, const char *arg, int unset)
{}

static int header_callback(const struct option *opt, const char *arg,
			   int unset)
{}

static int from_callback(const struct option *opt, const char *arg, int unset)
{}

static int base_callback(const struct option *opt, const char *arg, int unset)
{}

struct base_tree_info {};

static struct commit *get_base_commit(const struct format_config *cfg,
				      struct commit **list,
				      int total)
{}

define_commit_slab(commit_base, int);

static void prepare_bases(struct base_tree_info *bases,
			  struct commit *base,
			  struct commit **list,
			  int total)
{}

static void print_bases(struct base_tree_info *bases, FILE *file)
{}

static const char *diff_title(struct strbuf *sb,
			      const char *reroll_count,
			      const char *generic,
			      const char *rerolled)
{}

static void infer_range_diff_ranges(struct strbuf *r1,
				    struct strbuf *r2,
				    const char *prev,
				    struct commit *origin,
				    struct commit *head)
{}

int cmd_format_patch(int argc,
		     const char **argv,
		     const char *prefix,
		     struct repository *repo UNUSED)
{}

static int add_pending_commit(const char *arg, struct rev_info *revs, int flags)
{}

static const char * const cherry_usage[] =;

static void print_commit(char sign, struct commit *commit, int verbose,
			 int abbrev, FILE *file)
{}

int cmd_cherry(int argc,
	       const char **argv,
	       const char *prefix,
	       struct repository *repo UNUSED)
{}