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

Re: [script] ge: export commits as patches

From
ZCZlatko Calusic <zlatko.calusic@iskon.hr>
Date
Apr 20, 2005, 17:21 UTC
Message-ID
<dn7jix8iu0.fsf@magla.zg.iskon.hr>
In-Reply-To
<20050419134843.GA19146@elte.hu>
Ingo Molnar <mingo@elte.hu> writes:
> TREE1=$(cat-file commit 2>/dev/null $1 | head -4 | grep ^tree | cut -d' ' -f2)
                                         --------------------------------------

And to make it easier on your eyes, you can always rewrite stuff like that (mentioned everywhere these days :)) like:

TREE1=$(cat-file commit 2>/dev/null $1 | awk '/^tree/ {print $2}'
                                         ------------------------

No, I'm definitely not trying to save some CPU cycles, CPU cycles are cheap, eyes are expensive! :)

-- 
Zlatko
Previous: David A. Wheeler
Message 8 of 8 in “[script] ge: export commits as patches”
  1. Ingo MolnarApr 19, 2005
  2. Petr BaudisApr 19, 2005
  3. Ingo MolnarApr 19, 2005
  4. Petr BaudisApr 19, 2005
  5. David A. WheelerApr 20, 2005
  6. Greg KHApr 19, 2005
  7. David A. WheelerApr 19, 2005
  8. Zlatko CalusicApr 20, 2005

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.