git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* GIT_PAGER=cat git-svn log --> Illegal seek
@ 2007-09-21 23:40 Chris Moore
  2007-09-22  1:48 ` [PATCH] git-svn: don't attempt to spawn pager if we don't want one Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Moore @ 2007-09-21 23:40 UTC (permalink / raw)
  To: git

I run my git commands inside an Emacs *shell* buffer, so I don't want
it running 'less' all the time.  I export GIT_PAGER=cat to stop it.

I just tried a "git-svn log" and it failed:

$ GIT_PAGER=cat git-svn log
Use of uninitialized value in exec at /usr/bin/git-svn line 3451.
Use of uninitialized value in concatenation (.) or string at
/usr/bin/git-svn line 3451.
Can't run pager: Illegal seek ()

I don't get a shell prompt back.  It just hangs.

This is on ubuntu feisty with the ubuntu-backport repositories enabled:

ii  git-core                                     1.5.2.5-2~feisty1
ii  git-svn                                      1.5.2.5-2~feisty1

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

* [PATCH] git-svn: don't attempt to spawn pager if we don't want one
  2007-09-21 23:40 GIT_PAGER=cat git-svn log --> Illegal seek Chris Moore
@ 2007-09-22  1:48 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2007-09-22  1:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Chris Moore, git

Even though config_pager() unset the $pager variable, we were
blindly calling exec() on it through run_pager().

Noticed-by: Chris Moore <christopher.ian.moore@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---

  Chris Moore <christopher.ian.moore@gmail.com> wrote:
  > I run my git commands inside an Emacs *shell* buffer, so I don't want
  > it running 'less' all the time.  I export GIT_PAGER=cat to stop it.
  > 
  > I just tried a "git-svn log" and it failed:
  > 
  > $ GIT_PAGER=cat git-svn log
  > Use of uninitialized value in exec at /usr/bin/git-svn line 3451.
  > Use of uninitialized value in concatenation (.) or string at
  > /usr/bin/git-svn line 3451.
  > Can't run pager: Illegal seek ()
  > 
  > I don't get a shell prompt back.  It just hangs.
  > 
  > This is on ubuntu feisty with the ubuntu-backport repositories enabled:
  > 
  > ii  git-core                                     1.5.2.5-2~feisty1
  > ii  git-svn                                      1.5.2.5-2~feisty1

 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 288d32c..484b057 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3578,7 +3578,7 @@ sub config_pager {
 }
 
 sub run_pager {
-	return unless -t *STDOUT;
+	return unless -t *STDOUT && defined $pager;
 	pipe my $rfd, my $wfd or return;
 	defined(my $pid = fork) or ::fatal "Can't fork: $!\n";
 	if (!$pid) {
-- 
Eric Wong

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

end of thread, other threads:[~2007-09-22  1:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-21 23:40 GIT_PAGER=cat git-svn log --> Illegal seek Chris Moore
2007-09-22  1:48 ` [PATCH] git-svn: don't attempt to spawn pager if we don't want one Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).