git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] show-branch: use pager
@ 2013-06-13  6:43 Øystein Walle
  2013-06-13  7:01 ` Jeff King
  2013-06-13 17:33 ` [PATCH RFC] " Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Øystein Walle @ 2013-06-13  6:43 UTC (permalink / raw)
  To: git; +Cc: Øystein Walle

This is for consistency with other porcelain commands such as 'log'.

Signed-off-by: Øystein Walle <oystwa@gmail.com>
---
The rationale for this patch I hope is consicely explained in the commit
message. I was rather surprised it didn't use a pager as I've gotten used to it
for most commands.

I marked this as an RFC because of Jeff King's comments in
daa0c3d97 where I got the impression this this might not be a good idea.
However I haven't found any bugs and all the tests pass. It is more a huble
suggestion than anything but I thought I might as well send it as a patch.

setup_pager() is already pulled in via cache.h so there was no need to add any
#include directive. I suppose this is as close to a one-liner as it gets :)

Best regards,
Øsse

 builtin/show-branch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 90fc6b1..bd3e10c 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -683,6 +683,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
 	};
 
 	git_config(git_show_branch_config, NULL);
+	setup_pager();
 
 	/* If nothing is specified, try the default first */
 	if (ac == 1 && default_num) {
-- 
1.8.2.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-13 17:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13  6:43 [PATCH RFC] show-branch: use pager Øystein Walle
2013-06-13  7:01 ` Jeff King
2013-06-13  7:57   ` [PATCH v2] " Øystein Walle
2013-06-13  9:32     ` Matthieu Moy
2013-06-13 17:33 ` [PATCH RFC] " Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).