Re: [PATCH 1/2] builtins: do not commit pager choice early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy wrote:

> Committing pager choice may require setting up the pager, which
> will need access to repository.
[...]
> Signed-off-by: Duy Nguyen <pclouds@xxxxxxxxx>

Tested-by: Jonathan Nieder <jrnieder@xxxxxxxxx>

Without this patch, I get

| * expecting success: 
|         test_terminal git --paginate rev-list HEAD &&
|         test -e paginated.out
| 
| fatal: internal error: access to .git/config without repo setup
| * FAIL 7: git --paginate rev-list uses a pager

and with it, t7006 passes again.  I assume on your system that
test was being skipped when running tests without -v (confusing,
yes) because that test needs a tty but IO::Pty from CPAN is not
present.

> There are several possible code path after
> handle_options()/commit_pager_choice() is called:
> 
> 1. list_common_cmds_help()
> 2. run_argv()
> 3. help_unknown_cmd()
> 
> Case 2. will have commit_pager_choice() called inside run_builtin() if
> a command is found. Case 1. and 3. won't need a pager, it's short
> printout and should be fitted within a screen. So, removing
> commit_pager_choice() call after handle_options() is safe.

Makes sense.

Thanks,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]