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

Re: Contents of file for a commit

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 27, 2008, 05:01 UTC
Message-ID
<20080127050127.GT24004@spearce.org>
In-Reply-To
<20080127044944.GA25247@coredump.intra.peff.net>
Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
> On Sat, Jan 26, 2008 at 11:40:27PM -0500, Shawn O. Pearce wrote:
> 
> > You can also just view the file if you don't want those changes
> > to be made:
> > 
> > `git show $commit -- $path`
> 
> That doesn't work. It says "show me $commit, but limited by $path". So
> if $path was changed, you see the commit log and diff. If it wasn't, you
> see nothing.
Gah.  Indeed.  I should have suggested to Bill:
`git show $commit:$path`
sorry about the confusion, and thanks for the clarification.  :-)
-- 
Shawn.
Previous: Jeff KingNext: Bill Lear
Message 5 of 6 in “Contents of file for a commit”
  1. Bill LearJan 27, 2008
  2. Jeff KingJan 27, 2008
  3. Shawn O. PearceJan 27, 2008
  4. Jeff KingJan 27, 2008
  5. Shawn O. PearceJan 27, 2008
  6. Bill LearJan 27, 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.