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

Re: an option to make "git-diff Z A" prints Z's diff before A's

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 26, 2006, 15:16 UTC
Message-ID
<Pine.LNX.4.64.0610260812120.3962@g5.osdl.org>
In-Reply-To
<20061026084221.GB13780@diana.vm.bytemark.co.uk>
On Thu, 26 Oct 2006, Karl Hasselström wrote:
> 
> A related question: is there a way to limit the path to Z, but
> excluding Z/B? That is, I'm interested in the changes in Z, but not
> the changes in its subdirectory B.

We never did that, no. It's certainly a relevant thing to do, and it would be sensible to have a kind of common logic with revision parsing (where a caret (^) at the beginning would mean "not"), but at the same time, it's not been common enough (read: "I have personally never missed it") to actually become an issue.

So I _think_ it would fit fairly well into the current code (just teach the stuff that uses "char **pathspec" about that new rule), and it might not be too bad. On the other hand, that particular code is pretty dense and part of a very core and performance critical subsystem, so unless you _really_ want this, you might be better off averting your eyes and just ignoring this issue ;)

			Linus
Previous: Karl Hasselström
Message 4 of 4 in “an option to make "git-diff Z A" prints Z's diff before A's”
  1. Jim MeyeringOct 25, 2006
  2. Junio C HamanoOct 25, 2006
  3. Karl HasselströmOct 26, 2006
  4. Linus TorvaldsOct 26, 2006

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.