Thread (10 messages) flat view 10 messages, 7 authors, 2016-06-15

Re: What I miss from Cogito...

From: Petr Baudis <hidden>
Date: 2016-06-15 22:44:26

On Sun, Mar 23, 2008 at 10:46:52AM -0700, H. Peter Anvin wrote:
Theodore Tso wrote:
quoted
#!/bin/sh
#
prefix=$(git rev-parse --show-prefix)
for i in $*
do
        git show HEAD:$prefix$i > $i
done
FWIW, cg-restore is a 131-line shell script, so one can assume it's not 
just doing it for fun.
Actually, such an assumption is not safe, simply since it was written
long before the :-syntax and many other nice features were invented; if
one wants to do things in Git sanely these days, it's not even safe to
look at Cogito's source code for inspiration anymore as it had to work
only with really hardcore primitives.

(And 38 lines is documentation.  ;-)

-- 
				Petr "Pasky" Baudis
Whatever you can do, or dream you can, begin it.
Boldness has genius, power, and magic in it.	-- J. W. von Goethe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help