author | Thomas Rast <trast@student.ethz.ch> | |
Mon, 19 Oct 2009 15:48:08 +0000 (17:48 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Oct 2009 05:28:20 +0000 (22:28 -0700) | ||
commit | dd2e794a214350711db46c4e08d9b19188a7d63a | |
tree | d9566af4d6b5eac1ba0fa0f1e6e3a3b08d56b858 | tree | snapshot |
parent | 9ecb2a7f496413b9a6404e4a19f7edee029819b8 | commit | diff |
Refactor pretty_print_commit arguments into a struct
pretty_print_commit() has a bunch of rarely-used arguments, and
introducing more of them requires yet another update of all the call
sites. Refactor most of them into a struct to make future extensions
easier.
The ones that stay "plain" arguments were chosen on the grounds that
all callers put real arguments there, whereas some callers have 0/NULL
for all arguments that were factored into the struct.
We declare the struct 'const' to ensure none of the callers are bitten
by the changed (no longer call-by-value) semantics.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty_print_commit() has a bunch of rarely-used arguments, and
introducing more of them requires yet another update of all the call
sites. Refactor most of them into a struct to make future extensions
easier.
The ones that stay "plain" arguments were chosen on the grounds that
all callers put real arguments there, whereas some callers have 0/NULL
for all arguments that were factored into the struct.
We declare the struct 'const' to ensure none of the callers are bitten
by the changed (no longer call-by-value) semantics.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 files changed:
archive.c | diff | blob | history | |
builtin-branch.c | diff | blob | history | |
builtin-checkout.c | diff | blob | history | |
builtin-commit.c | diff | blob | history | |
builtin-log.c | diff | blob | history | |
builtin-merge.c | diff | blob | history | |
builtin-rev-list.c | diff | blob | history | |
builtin-shortlog.c | diff | blob | history | |
builtin-show-branch.c | diff | blob | history | |
commit.h | diff | blob | history | |
log-tree.c | diff | blob | history | |
pretty.c | diff | blob | history |