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

Re: [PATCH] Document git-diff whitespace flags -b and -w

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 3, 2006, 19:10 UTC
Message-ID
<Pine.LNX.4.63.0612032006580.28348@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<ekv5k6$1ih$1@sea.gmane.org>
Hi,
On Sun, 3 Dec 2006, Jakub Narebski wrote:
> Alternate solution would be to fix documentation, to document existing 
> code. I used GNU diff documentation, perhaps it is better if we are GNU 
> diff compatibile...

Since the whole point of "-w/-b" is to steal the nice feature from GNU diff, it does not make any sense breaking compatibility.

BTW on top of my patch you need this, if you want the tests to pass (danger ahead: intentional white space at eol):

-- snip -- make tests pass for recent "diff -b" change

---
	Am I the only one finding it funny to read diffs of diffs, 
	especially when being used to combined diffs?
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index 1bc5b7a..adf4993 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -109,12 +109,10 @@ index d99af23..8b32fb5 100644
 +	whitespace at beginning
  whitespace change
 -whitespace in the middle
--whitespace at end
 +white space in the middle
-+whitespace at end  
+ whitespace at end
  unchanged line
--CR at endQ
-+CR at end
+ CR at endQ
 EOF
 git-diff -b > out
Previous: Jakub NarebskiNext: Junio C Hamano
Message 4 of 6 in “Document git-diff whitespace flags -b and -w”
  1. Document git-diff whitespace flags -b and -wJakub Narebski, Dec 3, 2006
  2. Johannes SchindelinDec 3, 2006
  3. Jakub NarebskiDec 3, 2006
  4. Johannes SchindelinDec 3, 2006
  5. Junio C HamanoDec 4, 2006
  6. Johannes SchindelinDec 4, 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.