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>
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>
This separates out the part that deals with one-commit diff-tree
(and --stdin form) into a separate log-tree module.
There are two goals with this. The more important one is to be
able to make this part available to "git log --diff", so that we
can have a native "git whatchanged" command. Another is to
simplify the commit log generation part simpler.
Signed-off-by: Junio C Hamano <junkio@cox.net>