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

Re: How can I restrict git-diff to a specific set of directories?

From
AAlan <alan@clueserver.org>
Date
Jan 14, 2009, 00:33 UTC
Message-ID
<1231893196.31432.7.camel@rotwang.fnordora.org>
In-Reply-To
<20090114000220.GB12624@atjola.homenet>
On Wed, 2009-01-14 at 01:02 +0100, Björn Steinbrink wrote:
Show 16 quoted lines
> On 2009.01.13 15:49:03 -0800, Alan wrote:
> > I have a repository that I need to build a set of patches for a single
> > directory path.  (I just want the diffs on the one driver.)
> > 
> > Is there a clean non-hacky way to do this?
> > 
> > It is not cross repository or anything. I just need to generate a diff
> > between one commit and another, but only for the contents of a specific
> > directory.
> > 
> > I am not finding a real straightforward way to do that.  (Unless I am
> > missing something, which is quite possible.)
> 
> git diff commitA commitB -- some/paths/here some/more/here and/then/some
> 
> That limits the diff to the paths after the dashes.
Thanks! That is EXACTLY what I need.
Previous: Björn SteinbrinkNext: Boyd Stephen Smith Jr.
Message 3 of 4 in “How can I restrict git-diff to a specific set of directories?”
  1. AlanJan 13, 2009
  2. Björn SteinbrinkJan 14, 2009
  3. AlanJan 14, 2009
  4. Boyd Stephen Smith Jr.Jan 14, 2009

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.