git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Ellson <ellson@research.att.com>
To: git@vger.kernel.org
Subject: Newbie question:  equiv of:  cvs co -p <filename>  ?
Date: Tue, 09 Aug 2005 17:59:14 -0400	[thread overview]
Message-ID: <ddb8vl$ifq$1@sea.gmane.org> (raw)

How can we cat the latest committed state of a file to stdout?

I hacked this:

	#!/bin/bash
	ID=`git-ls-files -s | grep $1 | cut -d ' ' -f 2`
	TMP=`git-unpack-file $ID`
	cat $TMP
	rm $TMP

but its really ugly!   It must be easier than this?

John

             reply	other threads:[~2005-08-09 22:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-09 21:59 John Ellson [this message]
2005-08-09 22:10 ` Newbie question: equiv of: cvs co -p <filename> ? Johannes Schindelin
2005-08-09 22:18   ` Rene Scharfe
2005-08-10  0:36 ` Linus Torvalds
2005-08-10 14:38   ` [PATCH] cg-cat [was: Re: Newbie question: equiv of: cvs co -p <filename> ? ] John Ellson
2005-08-11 23:03     ` Petr Baudis
2005-08-12  7:53       ` Matthias Urlichs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ddb8vl$ifq$1@sea.gmane.org' \
    --to=ellson@research.att.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).