git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What I miss from Cogito...

From
Petr Baudis <pasky@suse.cz>
Date
Mar 27, 2008, 02:36 UTC
Message-ID
<20080327023654.GE6803@machine.or.cz>
In-Reply-To
<47E6978C.4040207@zytor.com>
On Sun, Mar 23, 2008 at 10:46:52AM -0700, H. Peter Anvin wrote:
Show 11 quoted lines
> Theodore Tso wrote:
>> #!/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
Previous: H. Peter AnvinNext: Luciano Rocha
Message 4 of 23 in “What I miss from Cogito...”
  1. H. Peter AnvinMar 23, 2008
  2. Theodore TsoMar 23, 2008
  3. H. Peter AnvinMar 23, 2008
  4. Petr BaudisMar 27, 2008
  5. Luciano RochaMar 23, 2008
  6. Mike HommeyMar 23, 2008
  7. Bruce StephensMar 23, 2008
  8. Mike HommeyMar 23, 2008
  9. Florian WeimerMar 23, 2008
  10. Theodore TsoMar 24, 2008
  11. Björn SteinbrinkMar 24, 2008
  12. Theodore TsoMar 24, 2008
  13. Junio C HamanoMar 24, 2008
  14. Documentation/git-checkout: Update summary to reflect current abilitiesJulian Phillips, Mar 24, 2008
  15. Junio C HamanoMar 24, 2008
  16. Documentation/git-checkout: Update summary to reflect current abilitiesJulian Phillips, Mar 24, 2008
  17. Björn SteinbrinkMar 24, 2008
  18. Johannes SchindelinMar 23, 2008
  19. Junio C HamanoMar 23, 2008
  20. H. Peter AnvinMar 23, 2008
  21. Junio C HamanoMar 23, 2008
  22. Daniel BarkalowMar 23, 2008
  23. H. Peter AnvinMar 23, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.