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

Re: [PATCH] add a diff-files command

From
Junio C Hamano <junkio@cox.net>
Date
Apr 28, 2005, 16:34 UTC
Message-ID
<7vr7gu97xq.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.62.0504272031330.14033@localhost.localdomain>
>>>>> "NP" == Nicolas Pitre <nico@cam.org> writes:

Having thought about it more, although I praise your enthusiasm to improve git, I suspect your diff-files is a solution to a problem that does not exist.

NP> It also has the ability to accept exclude file patterns with NP> -x and even a file containing a list of patterns to exclude NP> with -X. This is especially useful to use the famous NP> dontdiff file when looking for uncommitted files in a NP> compiled kernel tree.

If you want to see if working tree has some junk other than those listed in dontdiff, wouldn't this be sufficient?

  $ show-files --others | grep -f dontdiff

NP> First, show-diff doesn't handle files in the work tree which NP> are not listed in the cache.

That's the whole point of git (and show-diff). If it is not listed in the cache, it does not exist.

NP> ... So trust me it _is_ pretty damn useful, unless you NP> always run "make clean" on your kernel tree before checking NP> for potentially uncommitted files then recompile everything NP> afterwards which is a hassle.

Why do you need to "make clean"? Is it because otherwise you would get lots of output for things that are listed in dontdiff but not listed in the cache, and the uncommitted but not listed in dontdiff file that you care about would get lost in the noise?

Earlier you complained show-diff does _not_ look at what are not listed in the cache. Now you want to exclude garbage that comes out of it because you have tons of stuff that are not listed in the cache, which implies show-diff _does_ look at what are not listed in the cache. Either you are contradicting yourself or I am confused.

The truth is, as you said earlier, show-diff does not look at them, so I do not understand what problem you are trying to describe here.

Again, "checking for potentially uncommitted" files is what you use show-files --others for, not show-diff.

Previous: Nicolas PitreNext: Nicolas Pitre
Message 4 of 6 in “add a diff-files command”
  1. add a diff-files commandNicolas Pitre, Apr 27, 2005
  2. Junio C HamanoApr 27, 2005
  3. Nicolas PitreApr 28, 2005
  4. Junio C HamanoApr 28, 2005
  5. Nicolas PitreApr 28, 2005
  6. Junio C HamanoApr 28, 2005

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.