Re: [script] ge: export commits as patches
- From
- Zlatko 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