diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-24 16:25:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-24 16:25:39 -0700 |
commit | 797d44343c831680aeae3392259fcadeb178bf61 (patch) | |
tree | 6639bf5dfb12eea0a67bd3b3323e3cabd79bc58e /wt-status.c | |
parent | 954f7cfdac48b8d9fe91c29ecfa44ac0c639867c (diff) | |
parent | 2bf6587349e31b582dae47954b1a334052230e28 (diff) | |
download | git-797d44343c831680aeae3392259fcadeb178bf61.tar.gz |
Merge branch 'pb/log-first-parent-p-m'
* pb/log-first-parent-p-m:
show --first-parent/-m: do not default to --cc
show -c: show patch text
revision: introduce setup_revision_opt
t4013: add tests for log -p -m --first-parent
git log -p -m: document -m and honor --first-parent
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/wt-status.c b/wt-status.c index 5807fc3211..dcaec7f09e 100644 --- a/wt-status.c +++ b/wt-status.c @@ -290,10 +290,13 @@ static void wt_status_collect_changes_worktree(struct wt_status *s) static void wt_status_collect_changes_index(struct wt_status *s) { struct rev_info rev; + struct setup_revision_opt opt; init_revisions(&rev, NULL); - setup_revisions(0, NULL, &rev, - s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference); + memset(&opt, 0, sizeof(opt)); + opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference; + setup_revisions(0, NULL, &rev, &opt); + rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK; rev.diffopt.format_callback = wt_status_collect_updated_cb; rev.diffopt.format_callback_data = s; @@ -512,11 +515,15 @@ static void wt_status_print_untracked(struct wt_status *s) static void wt_status_print_verbose(struct wt_status *s) { struct rev_info rev; + struct setup_revision_opt opt; init_revisions(&rev, NULL); DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV); - setup_revisions(0, NULL, &rev, - s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference); + + memset(&opt, 0, sizeof(opt)); + opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference; + setup_revisions(0, NULL, &rev, &opt); + rev.diffopt.output_format |= DIFF_FORMAT_PATCH; rev.diffopt.detect_rename = 1; rev.diffopt.file = s->fp; |