CMIT_FMT_FULL,
CMIT_FMT_FULLER,
CMIT_FMT_ONELINE,
+
+ CMIT_FMT_UNSPECIFIED,
};
extern enum cmit_fmt get_commit_format(const char *arg);
git_config(git_diff_config);
nr_sha1 = 0;
+ init_revisions(opt);
opt->abbrev = 0;
argc = setup_revisions(argc, argv, opt, NULL);
const char *commit_prefix = "commit ";
int shown = 0;
+ init_revisions(&rev);
rev.abbrev = DEFAULT_ABBREV;
argc = setup_revisions(argc, argv, &rev, "HEAD");
if (argc > 1)
commit_argv[3] = old_sha1_hex;
commit_argc++;
}
+ init_revisions(&revs);
setup_revisions(commit_argc, commit_argv, &revs, NULL);
free(new_sha1_hex);
if (old_sha1_hex) {
void init_revisions(struct rev_info *revs)
{
- unsigned abbrev = revs->abbrev;
-
memset(revs, 0, sizeof(*revs));
- revs->abbrev = abbrev;
+ revs->abbrev = DEFAULT_ABBREV;
revs->ignore_merges = 1;
revs->pruning.recursive = 1;
revs->pruning.add_remove = file_add_remove;
const char **unrecognized = argv + 1;
int left = 1;
- init_revisions(revs);
-
/* First, search for "--" */
seen_dashdash = 0;
for (i = 1; i < argc; i++) {