summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f4235f8)
raw | patch | inline | side by side (parent: f4235f8)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 15 Apr 2006 10:54:32 +0000 (03:54 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 15 Apr 2006 11:03:48 +0000 (04:03 -0700) |
We need to have two sets of diff_options structure and abbrev
settings, but there is no point having two separate commit
format setting. Fix the confusion.
Also properly initialize the command options structure.
Signed-off-by: Junio C Hamano <junkio@cox.net>
settings, but there is no point having two separate commit
format setting. Fix the confusion.
Also properly initialize the command options structure.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git.c | patch | blob | history | |
log-tree.h | patch | blob | history |
index 0741c5a36d4a5a0b4cf9b055ecc4d8bc95bf806a..22fec3d79f979627684594e3cd464fa72f55dcab 100644 (file)
--- a/git.c
+++ b/git.c
struct rev_info *rev = &wcopt.revopt;
struct log_tree_opt *opt = &wcopt.logopt;
+ memset(&wcopt, 0, sizeof(wcopt));
init_log_tree_opt(&wcopt.logopt);
- wcopt.commit_format = CMIT_FMT_DEFAULT;
+ opt->commit_format = CMIT_FMT_DEFAULT;
wcopt.abbrev = DEFAULT_ABBREV;
argc = parse_whatchanged_opt(argc, argv, &wcopt);
- if (wcopt.logopt.commit_format == CMIT_FMT_ONELINE)
+ if (opt->commit_format == CMIT_FMT_ONELINE)
commit_prefix = "";
prepare_revision_walk(rev);
setup_pager();
while ((commit = get_revision(rev)) != NULL) {
if (shown && wcopt.do_diff &&
- wcopt.commit_format != CMIT_FMT_ONELINE)
+ opt->commit_format != CMIT_FMT_ONELINE)
putchar('\n');
fputs(commit_prefix, stdout);
if (wcopt.abbrev_commit && wcopt.abbrev)
parents = parents->next)
parents->item->object.flags &= ~TMP_MARK;
}
- if (wcopt.commit_format == CMIT_FMT_ONELINE)
+ if (opt->commit_format == CMIT_FMT_ONELINE)
putchar(' ');
else
putchar('\n');
- pretty_print_commit(wcopt.commit_format, commit, ~0, buf,
+ pretty_print_commit(opt->commit_format, commit, ~0, buf,
LOGSIZE, wcopt.abbrev);
printf("%s\n", buf);
if (wcopt.do_diff)
diff --git a/log-tree.h b/log-tree.h
index 50cbfb3012af1f663923bf6b064980f6c3962515..8d8f6f14589fed87a8e77455a7eb4ef814f2d40b 100644 (file)
--- a/log-tree.h
+++ b/log-tree.h
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;