Re: [PATCH v2 1/3] t7700: demonstrate mishandling of objects in packs with a .keep file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 4, 2008, 19:55 UTC
- Message-ID
- <7vmygfqn92.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <V78jOMhdYwpSlLU-YzsqEHZxJyrvKbXRQbKsuNPZOEtB8E0kZ5Wi7Q@cipher.nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 5 quoted lines
> Andreas Ericsson wrote: > >> sed 1q is faster, as it stops parsing after the first line (the same as >> 'head >> -n 1' does, but in a more portable fashion).
If your sed is GNU, and you are doing this for a small file, the startup cost of it may dwarf such gain ;-)
Show 5 quoted lines
> Except that I wanted all but the _last_ line though. > > I didn't think about using sed. Perhaps I could have used something like > > sed -n -e '$q' -e 'p'
You surely meant "sed -e '$d'", right?
> The grep works though.
Indeed.