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

[RFC] git diff dira dirb file ...

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jun 6, 2008, 22:27 UTC
Message-ID
<alpine.LNX.1.00.0806061821320.19665@iabervon.org>

After a lot of trying, I finally found something that git diff doesn't handle. If you've got two trees of files with the same general structure, even if they aren't at all git-related, you can use:

$ git diff dira dirb

to get a nice diff between them. But then it would be intuitive and useful to be able to restrict by path the files within those directories that you want to compare (much like "git diff origin master file1 file2 ...") with:

$ git diff dira dirb file1 file2

That would, of course, compare dira/file1 with dirb/file1 and dira/file2 with dirb/file2. Before I start looking into implementing this, is it incoherent for some reason I'm not seeing?

	-Daniel
*This .sig left intentionally blank*
Next: Junio C Hamano
Message 1 of 3 in “[RFC] git diff dira dirb file ...”
  1. Daniel BarkalowJun 6, 2008
  2. Junio C HamanoJun 7, 2008
  3. Daniel BarkalowJun 7, 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.