Thread (32 messages) flat view 32 messages, 17 authors, 2016-06-15

Re: [ANNOUNCE] git-pasky-0.6.2 && heads-up on upcoming changes

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:41:53


On Wed, 20 Apr 2005, Linus Torvalds wrote:
Pasky,
 what do you think about this change to "git log"?
Here's a slightly updated version.

It's identical to the previous one, except that it also feeds the result 
through "| ${PAGER:-less}" which makes it a lot more useful, in my 
opinion.

If you redirect the output to a non-tty, both "less" and "more" do the 
right thing and just feed the output straight through. But if the output 
is a tty, this makes "git log" a lot more friendly than a quickly 
scrolling mess..

		Linus

----
gitlog.sh: a496a864f9586e47a4d7bd3ae0af0b3e07b7deb8
--- a/gitlog.sh
+++ b/gitlog.sh
@@ -28,7 +28,7 @@ rev-tree $base | sort -rn | while read t
 				fi
 				;;
 			"")
-				echo; cat
+				echo; sed 's/^/  /'
 				;;
 			*)
 				echo $key $rest
@@ -36,5 +36,5 @@ rev-tree $base | sort -rn | while read t
 			esac
 
 		done
-	echo -e "\n--------------------------"
-done
+	echo
+done | ${PAGER:-less}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help