From 5db29062f5708ecff368442da0121ffbe265fa17 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 27 Mar 2012 22:18:20 +0530 Subject: [PATCH] try: info command header enhanced --- src/commands/info | 4 +++- t/info.t | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/info b/src/commands/info index 66b7e68..2dc433b 100755 --- a/src/commands/info +++ b/src/commands/info @@ -47,7 +47,9 @@ $patt = shift || '.'; my $user = $ENV{GL_USER} or _die "GL_USER not set"; my $ref = 'any'; -print "hello $user, this is gitolite3 " . version() . " on git " . substr( `git --version`, 12 ) . "\n"; +chomp(my $hn = `hostname -s`); +my $gv = substr( `git --version`, 12 ); +print "hello $user, this is $ENV{USER}\@$hn running gitolite3 " . version() . " on git $gv\n"; my $lr = lister_dispatch('list-repos'); diff --git a/t/info.t b/t/info.t index 7844fa5..ccb25b3 100755 --- a/t/info.t +++ b/t/info.t @@ -34,7 +34,7 @@ try " "; # GS == greeting string -try "DEF GS = /hello %1, this is gitolite/"; +try "DEF GS = /hello %1, this is $ENV{USER}\\@.* running gitolite/"; try " glt info u1; ok; GS u1