Re: [PATCH] pager: config variable pager.color
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 29, 2006, 23:15 UTC
- Message-ID
- <Pine.LNX.4.63.0607300112340.29667@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <E1G6xHb-0008Rw-G2@moooo.ath.cx>
Hi,
On Sun, 30 Jul 2006, Matthias Lederhofer wrote:
Show 36 quoted lines
> diff --git a/builtin-log.c b/builtin-log.c
> index 82c69d1..7fdefec 100644
> --- a/builtin-log.c
> +++ b/builtin-log.c
> @@ -34,7 +34,6 @@ static int cmd_log_walk(struct rev_info
> struct commit *commit;
>
> prepare_revision_walk(rev);
> - setup_pager();
> while ((commit = get_revision(rev)) != NULL) {
> log_tree_commit(rev, commit);
> free(commit->buffer);
> @@ -49,6 +48,7 @@ int cmd_whatchanged(int argc, const char
> {
> struct rev_info rev;
>
> + setup_pager();
> git_config(git_diff_ui_config);
> init_revisions(&rev, prefix);
> rev.diff = 1;
> @@ -64,6 +64,7 @@ int cmd_show(int argc, const char **argv
> {
> struct rev_info rev;
>
> + setup_pager();
> git_config(git_diff_ui_config);
> init_revisions(&rev, prefix);
> rev.diff = 1;
> @@ -81,6 +82,7 @@ int cmd_log(int argc, const char **argv,
> {
> struct rev_info rev;
>
> + setup_pager();
> git_config(git_diff_ui_config);
> init_revisions(&rev, prefix);
> rev.always_show_header = 1;Why? The three users of cmd_log_walk() need to call setup_pager() explicitely, when cmd_log_walk() can do it for them?
Oh, and I do not really understand why you would enable color _at all_ if you want to disable it when paging. Do you have many instances when you want a color diff which is short enough not to be paged?
Ciao, Dscho