Merge branch 'jn/paginate-fix'

* jn/paginate-fix:
  git --paginate: paginate external commands again
  git --paginate: do not commit pager choice too early
  tests: local config file should be honored from subdirs of toplevel
  t7006: test pager configuration for several git commands
  t7006 (pager): introduce helper for parameterized tests

Conflicts:
	t/t7006-pager.sh
This commit is contained in:
Junio C Hamano
2010-07-15 12:09:14 -07:00
2 changed files with 200 additions and 46 deletions

5
git.c
View File

@ -167,6 +167,7 @@ static int handle_alias(int *argcp, const char ***argv)
alias_string = alias_lookup(alias_command);
if (alias_string) {
if (alias_string[0] == '!') {
commit_pager_choice();
if (*argcp > 1) {
struct strbuf buf;
@ -432,6 +433,8 @@ static void execv_dashed_external(const char **argv)
const char *tmp;
int status;
commit_pager_choice();
strbuf_addf(&cmd, "git-%s", argv[0]);
/*
@ -511,12 +514,12 @@ int main(int argc, const char **argv)
argv++;
argc--;
handle_options(&argv, &argc, NULL);
commit_pager_choice();
if (argc > 0) {
if (!prefixcmp(argv[0], "--"))
argv[0] += 2;
} else {
/* The user didn't specify a command; give them help */
commit_pager_choice();
printf("usage: %s\n\n", git_usage_string);
list_common_cmds_help();
printf("\n%s\n", git_more_info_string);